Concept:The polarity of an electromagnet is set by the direction of current flow through the coil.Explanation:Use the right-hand grip rule: if the fingers curl along the current direction, the thumb points toward the north pole.So, changing the current direction swaps the north and south poles of the electromagnet.Answer:D. direction of current in the wire