Answer: When you change the direction of the current, you also change the direction of the magnetic field. Because the magnetic field created by the electric current in the wire is changing directions around the wire, it will repel both poles of the magnet by bending away from the wire.
Step-by-step explanation: