You can tell what elements have how many valence electrons by what group they're in. Groups are vertical. So group 1 has 1 valence electron Group 2 has 2 valence electrons Group 3 has 3 valence electrons, etc.
Answer from: Quest
Moles = mass/molar mass the molar mass of c20 = 12.011*20 = 240.22 g per mole therefore, the number of moles is 20 g / 240.22 g per mol = 0.0833 moles.