Answer: The number of moles of magnesium in given amount is 0.2056 moles.
Step-by-step explanation:
To calculate the number of moles, we use the equation:

We are given:
Given mass of magnesium = 5 g
Molar mass of magnesium = 24.31 g/mol
Putting values in above equation, we get:

Hence, the number of moles of magnesium in given amount is 0.2056 moles.