As soon as the electrical supply is switched off, i.e. when there is no current, the piece of metal is no longer magnetic. Wrapping the wire around the piece of metal more times makes the electromagnet stronger. Why do you think this is?

7