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
Edit Content
Print
Embed
More
Assignments
Leaderboard
Show more
Show less
This leaderboard is currently private. Click
Share
to make it public.
This leaderboard has been disabled by the resource owner.
This leaderboard is disabled as your options are different to the resource owner.
Revert Options
Unjumble
is an open-ended template. It does not generate scores for a leaderboard.
Log in required
Visual style
Fonts
Subscription required
Options
Switch template
Show all
More formats will appear as you play the activity.
)
Open results
Copy link
QR code
Delete
Continue editing:
?