Answer : The number of valance electrons for magnesium are 2.
Explanation :
The given element is magnesium (Mg). The element magnesium belongs to group 2 and period 3.
The atomic number of magnesium is 12 and the atomic mass is 24.
The number of electrons present in magnesium are 12.
So, the electronic configuration of magnesium will be,

From the electronic configuration we conclude that, the outermost shell of magnesium is '3s' and the number of electrons present in '3s' is 2. And we know that the number of electrons present in outermost shell is known as valance electrons.
Hence, the number of valance electrons for magnesium are 2.