What we will do: We will switch on a current in a wire next to a compass and see the needle deflect, then build an electromagnet from a coil and a core and check what its strength depends on.
What you see on screen: A current-carrying wire next to a compass needle, a current switch and a current slider — switching on the current deflects the needle. In electromagnet mode a coil with a core attracts paper clips, and the current and number-of-turns sliders change its strength. Readouts: current, number of turns, needle deflection / electromagnet strength.

I’ll give you a number of clips to attract — switch to Electromagnet, turn on the current and tune the current and the turns. Strength ∝ I·N.
What just happened?
Switching on the current deflected the compass needle lying next to the wire. The current alone produced a magnetic field — this is Ørsted’s famous experiment.
Current produces magnetism:
around every wire carrying a current a magnetic field arises. It is this field that deflects the compass needle. The larger the current, the stronger the field and the greater the deflection. When the current is switched off, the field disappears.
The electromagnet:
when you wind the wire into a coil and insert an iron core, the fields of all the turns add up — a strong electromagnet is formed. Its strength grows with a larger current, more turns and the core. Once the current is disconnected it stops attracting (that is its advantage over an ordinary magnet — you can switch it on and off).
Direction of the field:
the field lines form circles around the wire; their direction is given by the right-hand rule.
A note on scope:
this is the school-level view of “current → magnetic field” (Ørsted’s experiment, the electromagnet); the quantitative Ampère’s law is already university material.
Why you need this for the exam:
the link between current and magnetic field, and the construction and uses of the electromagnet (bell, motor, relay, magnetic crane), are typical exam topics.
Remember: a flowing current produces a magnetic field. Winding the wire into a coil with a core gives an electromagnet that can be switched on and off.
A flowing current produces a magnetic field around the wire, which deflects the compass needle. The field around a straight wire: It grows with the current and decreases with distance.
Inside a solenoid the field is uniform and depends on the density of turns: The strength of the electromagnet grows with the current and the number of turns , and an iron core increases it many times over.
You can switch it on, switch it off and control its strength with the current — once the current is disconnected it stops attracting.
Symbols: — magnetic field, — permeability of free space, — current, — distance from the wire, — number of turns, — length of the coil.
That a flowing electric current produces a magnetic field around the wire, which deflects a compass needle.
On the current, the number of turns of the coil and the presence of an iron core.
You can switch it on and off and control its strength with the current — once the current is disconnected it stops attracting.
Teaching? Embed this experiment on your site.
Free widget — paste it on your school site, blog or notes. It links to the full version.