The elements sodium and magnesium are located in Period 3 of the periodic table and show predictable patterns in electron arrangement.
(a) Write the electron configuration of sodium () and magnesium ().
(b) the number of core and valence electrons in each atom.