7. A pocket contains five equally sized small balls, of which two are red, two are white, and one is black. The probability that the colors of two adjacent balls are different when the five balls are drawn in sequence is $\qquad$ (answer with a number).


7. $\frac{2}{5}$.

Consider the five balls as distinct. There are $5!=120$ possible ways to draw the five balls one by one from the bag.

There are $2!\times 4!$ possible ways for the two white balls to be adjacent; there are $2!\times 4!$ possible ways for the two red balls to be adjacent; there are $2!\times 2!\times 3!$ possible ways for both the two white balls and the two red balls to be adjacent. Therefore, the number of possible scenarios where adjacent balls are of different colors is
$$
\begin{array}{l}
5!-2!\times 4!-2!\times 4!+2!\times 2!\times 3! \\
=48 \text { (ways). }
\end{array}
$$

Thus, the required probability is $\frac{48}{120}=\frac{2}{5}$.