Yes, Anna, you used past simple and past perfect correctly in a those sentences, and the meaning is clear for each one. Good job!
The only correction I would make (unrelated to verb tense) is to not say "better" in number 4. You either pass or fail an exam. But you can score better. So either of these would be correct, depending on your intended meaning:
We expected that you had passed your exam.
We expected that you had scored better on your exam.