Solution :
The compounds which contain either $$C{H_3} - CO - $$ group or

group give positive
iodoform test. In 2-pentanone, $$\left( {C{H_3}C{H_2}C{H_2}COC{H_3}} \right),C{H_3}CHO$$ and $${C_2}{H_5}OH,$$ required groups are present, thus they give iodoform as follows
$$C{H_3} - COC{H_2} - C{H_2}\,C{H_3} + 3{I_2}$$ \[+4NaOH\to \underset{\begin{smallmatrix}
\text{Iodoform} \\
\text{(yellow ppt}\text{.)}
\end{smallmatrix}}{\mathop{CH{{I}_{3}}\downarrow }}\,\] $$ + C{H_3}C{H_2}C{H_2}COONa + 3NaI$$ $$ + 3{H_2}O$$
$$C{H_3}\,CHO + 3{I_2} + 4NaOH \to $$ \[\underset{\begin{smallmatrix}
\text{Iodoform} \\
\text{(yellow ppt)}
\end{smallmatrix}}{\mathop{CH{{I}_{3}}}}\,\downarrow +HCOONa+3NaI\] $$ + 3{H_2}O$$
\[{{C}_{2}}{{H}_{5}}OH\xrightarrow{{{I}_{2}}}C{{H}_{3}}CHO\]
$$C{H_3}CHO + 3{I_2} + 4NaOH \to $$ \[\underset{\text{Iodoform}}{\mathop{CH{{I}_{3}}\downarrow }}\,\,+HCOONa+3NaI+3{{H}_{2}}O\]
But due to absence of

group in 3-pentanone, it does not give iodoform.