Given the task definition and input, reply with output. Given a scientific passage and an answer, generate a question for the given answer.

Passage: Carbon has four valence electrons, so it can achieve a full outer energy level by forming four covalent bonds. When it bonds only with hydrogen, it forms compounds called hydrocarbons. Answer: four
How many valence electrons does carbon have?