Call

It is abundantly clear that magnesium is in vast molar excess:

i.e. $"Moles of metal"$ $=$ $(100*g)/(24.31*g*mol^-1)$ $~=$ $5*mol$

$"Moles of dioxygen"$ $=$ $(2.5*g)/(32.00*g*mol^-1)$ $~=$ $0.08*mol$

Clearly, $O_2$ is the , and our calculation proceeds on the basis of the molar quantity of the gas.