Snape’s knowledge of valence shells

Just a quick question.

Harry James Potter Evans-Verres and the Methods of Rationality: Chapter 18

HJPEV: So, Professor, can you tell me how many electrons are in the outermost orbital of a carbon atom?”

Severus’s smile widened. “Four,” he said. “It is a useless fact which no one should bother writing down, however.”

Did Snape really know that, or did he read Harry’s mind?

As to the possibility, this passage, “Harry stared into Severus’s cold gaze and remembered that the Sorting Hat had warned him not to meet anyone’s eyes while thinking about—Harry dropped his gaze to Severus’s desk.” occurs after that already quoted.

(If I do something wrong here, which merits a downvote, would you mind specifying the error in question?)