Q:

Which gas is a oxidizing agent as well as a reducing agent?

I think it's Hydrogen, because,
$\ce{PbO + H2 -> Pb + H2O}$
Here $\ce{PbO}$ is reduced to $\ce{Pb}$ and $\ce{H2}$ acts as a reducing agent.
But, in $\ce{2K + H2 -> 2KH}$, hydrogen gains a electron and undergoes reduction 
Thus, $\ce{K}$ is oxidized to $\ce{KH}$ and hydrogen works as oxidizing agent.
My teacher says it's wrong but doesn't give any explanation.
Can someone explain why my reasoning is wrong.

A:

I'm guessing your teacher is looking for sulfur dioxide as the answer, but I don't see how or why you're supposed to be able to arrive to this answer logically. Either you'd need to read about it specifically, or maybe you're supposed to stare at a table of standard reduction potentials and notice that $\ce{SO2}$ appears as both a reagent and as a product with comparable voltages:
$$
\begin{array}{}
\ce{SO2(aq) + 4 H+(aq) + 4 e- &<=>& S(s) + 2 H2O(l)} &  E^\circ = \pu{+0.50 V}\\
\ce{SO2(aq) + 2 H2O(l) &<=>& SO4^2-(aq) + 4 H+(aq) + 2 e-} &  E^\circ = \pu{-0.17 V}
\end{array}
$$
(The bottom equation is the inverse of what you would find in a reduction potential table)
Extrapolating from these aqueous potentials, it appears $\ce{SO2}$ is a modest reductant and a weak oxidiser, but both reactions can be accessed in reasonable conditions. 
I think you're technically correct (as Ivan mentions), but what makes hydrogen gas a "less correct" answer is that it only rarely acts an oxidiser (in the presence of very strong reducing agents, such as alkali metals), whereas it can act as a reductant much more commonly. Compare these equations with the ones above:
$$
\begin{array}{}
\ce{H2(g) + 2 e- &<=>& 2 H^-(aq, extrapolated)} &  E^\circ = \pu{-2.3 V}\\
\ce{H2(g) &<=>& 2 H+(aq) + 2 e-} &  E^\circ = \pu{+0.00 V}
\end{array}
$$
(Reference for the hydride potential)
Note the much larger gap in potential between the two reactions. In this sense, the reducing nature of $\ce{H2}$ vastly overwhelms its oxidising nature, so most people will think of it as a reducing gas.

