LAB 1 – “20,000 Lights”


A room has 20,000 light bulbs, each with its own pull-string. Twenty-thousand people walk into the room, one at a time. The first person pulls each string, turning all the lights on. The second person pulls every second light bulb’s string (the 2nd, 4th, etc.) The third person pulls every third string, the fourth every fourth, and so on. Eventually the twenty-thousandth person pulls the string on the twenty-thousandth light.

A) How many light bulbs are on?
B) Which light bulbs are they?


WHAT I EXPECT
- Create a new folder called “Labs”
- Create a new project called “Lab1Lights”
- Create an application program called “Lab1Lights”
- All you will need is a main method.

METHODS
- There are a few different ways to answer this problem. We will discuss them.

This lab is worth 20 points. If you can figure out part A, then you should easily be able to get the answer to part B.