Simple Past or Past Perfect?

Gapfill exercise

Enter your answers in the gaps. When you have entered all the answers, click on the "Check" button.
Peter (say) he (lose) his keys the week before.
I (know) who Mr Smith (be).
After I (cut) the grass I (visit) my friend.
(have, you) breakfast before you (take) the medicine?
When I (get) home Phil (clean) the house.
By the time I (finish) work my favourite TV programme (end).
(see, you) that man before he (attack) you?
When I (close) the house I (notice) that I (leave) a window open.
What would you have done if you (have) an accident?
The policeman (ask) him why he (crash) into the tree.