ScratchData LogoScratchData
Back to greenflash's profile

The Locker Problem

GRgreenflash•Created April 16, 2010
The Locker Problem
6
5
1014 views
View on Scratch

Description

In a hallway of n lockers, the first student goes down the hall and opens every locker. The second person changes the position (if it is open, the student closes it and vice versa) of every second locker and so on. By the end of this, how many lockers are open? Do you notice a pattern? Press Space to enter another number. Enjoy!

Project Details

Project ID990542
CreatedApril 16, 2010
Last ModifiedApril 16, 2010
SharedApril 16, 2010
Visibilityvisible
CommentsAllowed