When we made the circuit with the battery and the compass the positive part of the magnetic needle was attracted by the positive pole of the battery and the other side of the needle was attracted by the negative side of the battery. This happens because the battery contains electromagnetism, in other words, the electricity it uses attracts magnets by having a magnetic force. When the battery is put close to the compass the force attracts.
In this activity we tried to use a nail and a battery along with a wire as a magnet, we proved that the more you spin the wire around the nail while it is in a connected circuit, the more magnetic force will be passed to the nail. At first, we passed the wire 14 times around the nail and it wouldn't attract the paper clip, but when we started to pass it more and more times around it would start having more force, when we got the paper clip to attract completely to the nail the wire had been passed 36 times around. One factor that influences the force is the times you spin the wire around the nail, the more the greater force.