The direction of current flowing in the coil of an electromagnet at its two ends X and Y are as shown in the diagram

a)What is the polarity of end X
b)What is polarity of end Y
c)Name and state the rule you have used to determine the polarities