Read the following assertion and reason to give the correct answer.
1.
| Assertion (A): | An iron nail wrapped with a current-carrying coil behaves like a magnet. |
| Reason (R): | Electric current flowing through the coil produces a magnetic field. |
2.
| Assertion (A): | Both ends of an electromagnet have the same magnetic pole. |
| Reason (R): | An electromagnet, like a bar magnet, possesses two opposite poles. |