Answer to Question #273299 in Python for Ange

Question #273299

I'm quite into games now, so how about we play In or Out! When a given number is even, the team scores so we shall print "In", but if it's not an even number, then we print "Out". Simple, right?

1
Expert's answer
2021-11-30T00:36:34-0500
Flag=1

while(Flag):
    n = int(input("Enter a number: "))
    if(n%2==0):
        print("IN")
    else:
        print("OUT")
    Flag = int(input("Press 1 to continue or 0 to QUIT: "))   

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS