Both mean *because*.I know that *denn* does not change the sentence structure of the subordinate clause, but *weil* does, i.e. pushing the verb to the end.Other than that, is there a difference between the two? Are there situations where *weil* is preferred to *denn* and vice-versa?
Other than the sentence structure you already mentioned, the difference is that "denn" is used more often in written and therefore more formal German and "weil" is very common in spoken German.