print('Type 1 to turn the light on or 0 to turn it off.') while True: command = input() if (command == '1'): print('The light is ON.') if (command == '0'): print('The light is OFF.')