7. There are 5 power poles, 2 of which will leak electricity. There are 5 birds each randomly choosing one of the poles to rest (if a bird touches a leaking pole, it will be stunned by the electric shock and fall to the ground). The probability that only 2 of the poles have birds on them is $\qquad$
7. $\frac{342}{625}$

Explanation: Let the 5 power poles be denoted as $a, b, c, d, e$, and assume $d, e$ are the poles with electrical leakage.
Let $A, B, C$ be the events that there are no birds on poles $a, b, c$, respectively.
First, 5 birds, each bird can choose one of the 5 poles, so there are $5^{5}$ different scenarios.
If there are no birds on pole $a$, then each bird has only 4 choices, so there are $4^{5}$ different scenarios,

Thus, $P(A)=\frac{4^{5}}{5^{5}}$.
Let $A B$ be the event that there are no birds on poles $a, b$, in this case, each bird has only 3 choices, so there are $3^{5}$ different scenarios, thus $P(A B)=\frac{3^{5}}{5^{5}}$. Similarly, $P(A C)=\frac{3^{5}}{5^{5}}$.

Let $A B C$ be the event that there are no birds on poles $a, b, c$, in this case, each bird has only 2 choices, so there are $2^{5}$ different scenarios, thus $P(A B C)=\frac{2^{5}}{5^{5}}$.
Let $A \bar{B} \bar{C}$ be the event that there are no birds on pole $a$ and there are birds on poles $b, c$, its probability is
$$
\begin{array}{c}
P(A \bar{B} \bar{C})=P(A \bar{B})-P(A \bar{B} C)=P(A)-P(A B)-P(A C)+P(A B C)=\frac{4^{5}-3^{5}-3^{5}+2^{5}}{5^{5}} \\
=\frac{1024-243-243+32}{3125}=\frac{570}{3125}=\frac{114}{625}
\end{array}
$$

Similarly, $P(\bar{A} B \bar{C})=P(\bar{A} \bar{B} C)=\frac{114}{625}$.
Therefore, the probability that there are birds on exactly 2 poles is:
$$
P(A \bar{B} \bar{C})+P(\bar{A} B \bar{C})+P(\bar{A} \bar{B} C)=\frac{114}{625}+\frac{114}{625}+\frac{114}{625}=\frac{342}{625}
$$