6. Four students each write a quadratic equation with real coefficients. The probability that exactly two of the four equations have no real roots is ( ).
(A) $\frac{1}{2}$
(B) $\frac{1}{4}$
(C) $\frac{1}{5}$
(D) $\frac{3}{8}$
6. D.

Each equation either has or does not have real roots, giving two possibilities for each equation. For four equations, there are $2^{4}=16$ possible scenarios. Additionally, the first equation without real roots has four possible choices, and the second equation without real roots has two possible choices, but the calculation $4 \times 3$ includes repetitions, so the number of scenarios where "exactly two of the four equations have no real roots" is $\frac{4 \times 3}{2}=6$. Therefore, the probability that exactly two of the four equations have no real roots is $\frac{6}{16}=\frac{3}{8}$.