The correct statement is: They have the same number of valence electrons.
Nitrogen (N) and oxygen (O) both belong to the same group (Group 15 for nitrogen and Group 16 for oxygen) in the periodic table, meaning they both have valence electrons. However, nitrogen has 5 valence electrons and oxygen has 6 valence electrons.
More accurately, they are in the same period (Period 2), but have different numbers of valence electrons (5 for nitrogen and 6 for oxygen).
Therefore, a more precise correct response to your query should be: They have valence electrons in the same energy level. This is because both elements are in Period 2 and have their valence electrons in the second energy level.