Snape’s knowledge of valence shells

Just a quick ques­tion.

Harry James Pot­ter Evans-Ver­res and the Meth­ods of Ra­tion­al­ity: Chap­ter 18

HJPEV: So, Pro­fes­sor, can you tell me how many elec­trons are in the out­er­most or­bital of a car­bon atom?”

Severus’s smile widened. “Four,” he said. “It is a use­less fact which no one should bother writ­ing down, how­ever.”

Did Snape re­ally know that, or did he read Harry’s mind?

As to the pos­si­bil­ity, this pas­sage, “Harry stared into Severus’s cold gaze and re­mem­bered that the Sort­ing Hat had warned him not to meet any­one’s eyes while think­ing about—Harry dropped his gaze to Severus’s desk.” oc­curs af­ter that already quoted.

(If I do some­thing wrong here, which mer­its a down­vote, would you mind spec­i­fy­ing the er­ror in ques­tion?)