Accademia:Changeover switch.py: differenze tra le versioni
Vai alla navigazione
Vai alla ricerca
(Nuova pagina: {{Template:Acc_Menu_Python}} <pre>#!/usr/bin/env python3 import algebrabool switch1 = input("How is the first switch placed? UP, DOWN\n> ") switch2 = input("How is the second switch ...) |
(Nessuna differenza)
|
Versione delle 21:01, 20 feb 2011
#!/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")