Whose is ready to earn their Boss Badge? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Whose is ready to earn their Boss Badge?

Help me get this code to work! (Thank you) print("Fill in the Blank Quiz") print("What is 2+2") answer = input(4) if answer == 4: print("You are correct!") if answer is not 4: print("Try again") print(answer)

17th May 2017, 12:06 PM
Andrew Rivera
Andrew Rivera - avatar
2 Answers
+ 1
print("Fill in the Blank Quiz") print("What is 2+2") answer = input("Enter Answer - ") if answer == "4": print("You are correct!") if answer != "4": print("Try again") print("Answer is not {}".format(answer))
17th May 2017, 12:24 PM
LordHill
LordHill - avatar
0
Here. Improved version (doesn't work on code playground because input is janky, but try it on a proper ide) https://code.sololearn.com/cREWPIHeYT3n/?ref=app
17th May 2017, 1:23 PM
LordHill
LordHill - avatar