You have to remember that transformers are an application of Lenz's Law, and respond to a change in flux. So as the student turned the thing on and off there was a change in flux, thus the answer is A.
Transformers do only work on AC, but the question wasn't asking for a working scenario...