dimanche 7 février 2016

Why does this not work?

r = input()
if r in ('7', '9') and str(question1) == 'cbca' or  r in ('1', '2') and str(question1) == ' cbbca':              
        print("That's correct!")
else : 
        print("That's wrong!")

When I run this code, everytime 'that's wrong' is printed also when the input == 7 or 9. Why?

Aucun commentaire:

Enregistrer un commentaire