mercredi 4 octobre 2017

If and Else help; python

i am new to the programming, and i learned basic commands, now i tried to create something like a quizz, so here is my code which is giving me a headache...

 prvo =input("How much is 5+5? ")
if (prvo)==10:
    print("Correct!")
else:
    print ("Sorry, but the answer isn't correct!")
    sys.exit()

When i enter 10 it says: "Sorry but the answer isn't correct!", same with every other number, help please. And can you please explain me what's wrong with it, because i really want to learn :)

Aucun commentaire:

Enregistrer un commentaire