Q: You are given a sentence and your task is to generate another sentence that supports the given input.
As alternating current moves back and forth in a wire, magnetic fields are created around the wire.
A:
Alternative current is produced when a magnet or coil moves back and forth repeatedly.