To determine the moles in 40 grams of magnesium, we need the atomic weight. This can easily be found on a periodic table. For this problem, let's use 24.305 grams/mole.
We are going to set up an equation to determine this problem. In this equation, we want all our units to cancel out except for 'moles.'

In this, we can see that the unit 'grams' will cancel out to leave us with moles.
In solving the equation, we determine that there are approximately 1.65 moles of Magnesium.
Use blue litmus paper. This is an indicator that can safely determine whether it is a base or an acid by changing color in response to the substance. This color indicates whether it is an acid or a base. Refer to the pH scale to see if the substance is basic or acidic.
The mass percentage is 15.1465%.
Examination by a test; experiment, as in chemistry, metallurgy, etc.