turnOn(1) turns on the first light turnOn(2) turns on the second light turnOff(1) turns off the first light sleep(2.5) wait for 2.5 seconds What instructions can we use?
Let's use a new instruction: isPressed() while True: if isPressed(): turnOff(1) turnOn(2) else: turnOff(2) turnOn(1) sleep(0.1) How can we use the button?