Question: The code with the black background is mine. I want to get the output it desires in the instructions and in the sample output (grey

 The code with the black background is mine. I want toget the output it desires in the instructions and in the sampleoutput (grey background). How can I add to my code to getthat output? Now that you can accept flips, we need to store

The code with the black background is mine. I want to get the output it desires in the instructions and in the sample output (grey background). How can I add to my code to get that output?

Now that you can accept flips, we need to store them. We already have a list that stores the state of each of the five switches, so you must now update that list in-place to store the correct state! For example, if the user flipped the 2nd light three times, the 4th light once, and 5th light twice, the switch list would look like: False True False True False index 0 index 1 index 2 index 3 index 4 switches- Remember, list indexing starts at 0, but we're presenting the choices to the user starting at 1, so the way the program assigns flips to each light switch will need to compensate for this offset

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!