Given the task definition and input, reply with output. Given scientific fact as input, generate the question from this fact such that it can be answered from the input.

Alternative current is produced when a magnet or coil moves back and forth repeatedly.
Alternative current is produced when a magnet or coil does what?