If an atom has an atomic number of 15 and an atomic mass of 31, how many electrons are contained in the outer shell?
The atomic number of 15 means the element is Phosphorous (P)
P is in group 16 on the periodic table (the group # is usually right on top of each column).
A little trick for finding the number of valence electrons is to simply look at its group number.
So, Phosphorous has 6 electrons in its outer shell (you just ignore the 1 in front for this).
Some other examples:
Carbon (C) is in group 14, it has 4 valence electrons
Magnesium (Mg) is in group 2, it has 2 valence electrons.