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....
Share
Share
Share
by
Snicholson
I-edit ang Content
I-Print kini
Embed
Uban pa
Assignments
Leaderboard
Show more
Show less
Kini nga leaderboard naka-pribado. Pag-klik sa
Share
aron himuon kini nga publiko.
Kini nga leaderboard gi-disable sa tag-iya sa resource.
Kini nga leaderboard gi-disable tungod ang imong mga kapilian lahi ra sa tag-iya sa resource.
I-revert ang mga Kapilian
Ang
Unjumble
usa ka open-ended nga template. Dili kini makamugna ug mga marka sa leaderboard.
Kinahanglan mag log in
Visual style
Fonts
Subscription required
Mga Option
I-switch ang template
Ipakita tanan
Daghang mga format ang mugawas samtang gidula nimo ang activity.
)
Open results
Copy link
QR code
Mag-delete
I-restore ang gi-autosave:
?