"come" usually carries the implication of moving oneself towards the speaker.; in this case, "Did you come to school?" is the son, at the school, asking his Dad if he had come to the school.
If the son, however, was not at the school (which given the provided context does not seem to be the case), then it would be appropriate to say "Did you go to [the] school?" because "go" usually carries the implication of moving oneself away from the speaker. ("Did you went to the school?" is wholly inappropriate; someone more knowledgeable than I would be able to better explain why).
"How do you come to school?" is also a perfectly legitimate question; it implies that the questioner, while at school, is asking someone else also at school about the means by which said someone else makes his/her way to school.
No. We generally wouldn't use this construction, but what it sounds like you mean is
"This variable needs to not be known."
Ie that we specifically do not want anyone to know what the variable is.
If that is what you intended to say, then you could say that, ie just say "This variable needs to not be known.", although strictly speaking it is us who have the needs, not the variable (a variable doesn't have needs or desires), so we might instead say "We need the variable to remain unknown".
If what you intended to say is that it doesn't matter whether you know it or not, you would say
"This variable does not need to be known.", or, again, putting the needs onto us rather than the variable, "We don't need to know the variable".
Best Answer
The sentence is grammatically correct, and its meaning is clear. The usage of "which in turn" is fine.
Basically, the sentence has three clauses.
The phase in turn is used in the sense of "it follows that" (or "as a result of things in the series of events"). In a sense, you can think of "in turn" as something that describes events that each of them takes turn to happen. Here is its definition by Macmillan: