Here's why:
* Word order: In German, the verb typically comes at the end of the sentence in a question.
* Case: "Friedrich" needs to be in the nominative case because it is the subject of the sentence.
Here's a corrected version:
Tanzt Friedrich in dem Haus?
This sentence is grammatically correct because:
* The verb "tanzt" is at the end of the sentence.
* "Friedrich" is in the nominative case.