0

I need help converting this problem into a python program. I've been at it for days and its due tomorrow. Someone please help!

In a locker room there are 1,000 lockers in a row numbered from 1 to 1,000. They are all closed. A monkey comes in and starting at locker 1opens every locker. Then another monkey comes in and starting with door two reverses every second door. Then another monkey comes in and reverses the door on every third locker. Then monkeys repeat the procedure with every fourth locker and every fifth and so on. What is the status of the lockers after 1,000 of these maneuvers? Create a Python program that allows a user to inquire the status of a given locker after the monkeys are done with the lockers.