mardi 7 août 2018

I am forming an if-else code in python and the output should be Correct Answer , but It's printing the else part of the code, I don't know why

user_answer=input("What is 8+13=")
answer=21
if user_answer==answer:
    print("Correct answer!")
else:
    print("Try Again!")

This is the code, even if it takes input as 21 , it prints the else part of the code

Aucun commentaire:

Enregistrer un commentaire