Wenn du mude bist, warum gehst du nicht schlafen?
Warum is supposed to move the veb gehst to the end. Why doesnt it do so here (in the question mentioned above) ? Is it because that doesnt happen in questions? Cux when i type "i dont know why you dont sleep" into google translate, i get gehst at the end (as it should be in a statement.)
Also, i'd have to say "wenn bist du mude?" for "when are you (ever) tired?" instead of "wenn du mude bist?" (X) right? Btw google translate gives me "wann" for this question. Its the same thing though i think.. yea?
PS "Wenn du mude bist, warum gehst du nicht schlafen?" (source: Duolingo)
Google translate isnt good for sentences.
Warum gehst du nicht schlafen? This a question and this is the main clause and the verb has to be at this place. Questions either start with the finite verb or with a question word (and after that the finite verb).
Wenn du müde bist, is a conditional clause and again the verb is on the correct position. YOu can place the entire conditional clause before or after the main clause, but the word order within those 2 sentence stays the same.
The sentence i dont know why you dont sleep / Ich weiß nicht, warum du nicht schlafen gehst is a different sentence with different grammar. Again we have a main clause "Ich weiß nicht," and a subordinate clause to be more precise its an interrogative clause. So first clause that starts with warum is a question clause and its the main clause. The second clause that starts with warum is part of a declaration as interrogative clause. These different grammatical structures cause/require the different word order.