Accademia:Changeover switch.py
Vai alla navigazione
Vai alla ricerca
#!/usr/bin/env python3 import algebrabool switch1 = input("How is the first switch placed? UP, DOWN\n> ") switch2 = input("How is the second switch placed? UP, DOWN\n> ") if algebrabool.XNOR(switch1, switch2): print("The light is ON") else: print("The light is OFF")