The number of moles of [tex]O_2[/tex] gas needed to react will be "2.0 moles".
According to the question,
Numbers of Mg,
Now,
→ [tex]4.0 \ moles \ of \ Mg\times \frac{1 \ mole \ O_2}{2 \ moles \ Mg}[/tex]
→ [tex]2.0\times 1[/tex]
→ [tex]2.0 \ moles[/tex]
Thus the above number of moles of oxygen gas is correct.
Learn more about oxygen here:
https://brainly.com/question/11110442