Molar mass of O2:-
[tex]\\ \rm\longmapsto 2(16u)=32g/mol[/tex]
Now
[tex]\boxed{\sf No\:of\;moles=\dfrac{Given\:Mass}{Molar\:Mass}}[/tex]
[tex]\\ \rm\longmapsto No\:of\;moles=\dfrac{32}{32}[/tex]
[tex]\\ \rm\longmapsto No\:of\;moles=1mol[/tex]