Question: in python: 5. Light Bulb Game Given a 55 grid of lights (randomly turned on/off - i.e. use 1 for on and 0 for off)
5. Light Bulb Game Given a 55 grid of lights (randomly turned on/off - i.e. use 1 for on and 0 for off) each light is controlled by a button which toggles the respective light and the adjoining, non-diagonal lights. The objective of this game is to turn off all lights (i.e. change all the numbers to 0 ). To simulate a button, simply use co-ordinates around the grid and have the user put in the co-ordinates to choose the light bulb to change. Example Starting Lights Lights After First Move Enter a button: C3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
