1st puzzle by Dr Harry Wiggins
There is a school with 2018 students and 2018 lockers. On the first day of term the headteacher asks the first student to go along and open every single locker, he asks the second to go to every second locker and close it, the third to go to every third locker and close it if it is open or open it if it is closed, the fourth to go to the fourth locker and so on. The process is completed with the 2018th student. How many lockers are open at the end?