while True : #infinite iteration, , A = input ( "Enter A" ), , B = input (" Enter B" ), , if A == "1" and B=="1" :, , print ( " 1" ) # out 1 to the screen, , else: # the code underneath is executed when the if condition is false, , print ( " 0 " ) # out 0 to the screen, , repeat = input ( " repeat? Y/N" ), , if repeat == " Y" :, , continue # this ensures the algorithm loops back, , else : # the code underneath is executed when the if condition is false, , break # this statement breaks from the loop, .
0%
Logic Gate Code....
Partajează
Partajează
Partajează
de
Snicholson
Editează conținutul
Imprimare
Încorporează
Mai multe
Misiuni
Clasament
Arată mai mult
Arată mai puțin
Acest clasament este în prezent privat. Fă clic pe
Distribuie
pentru a-l face public.
Acest clasament a fost dezactivat de proprietarul resursei.
Acest clasament este dezactivat, deoarece opțiunile tale sunt diferite de ale proprietarului resursei.
Opțiuni de revenire
Rearanjează
este un șablon deschis. Nu generează scoruri pentru un clasament.
Este necesară conectarea
Stilul vizual
Fonturi
Este necesar un abonament
Opţiuni
Comutare șablon
Arată tot
Mai multe formate vor apărea pe măsură ce folosești activitatea.
)
Rezultate deschise
Copiați linkul
Cod QR
Şterge
Restaurare activitate salvată automat:
?