It’s the last option To help
Ayer mi amigo me sorprendió con una visita.
This sentence is grammatically correct.
The correct translation is: <em>Yesterday my friend surprised me with a visit</em>.
In the sentence there is a correct use of the past in the word "sorprendió" (surprised) that is in accordance with the time "ayer" (yesterday). In addition, it is correctly accentuated the word "sorprendió".
Choose ALL of the occasions when you would use the Imperfect Tense:
Answer: B. To set the scene in the past.
C. To describe a condition or emotion in the past.
E. To describe habits in the past.
Hope this helps!