Question: how many valence electrons does a magnesium atom have?
Answer: The outer energy level for this atom is n = 3, and it has two electrons in this energy level. Therefore, magnesium has two valence electrons.