mardi 4 août 2020

I don't know why my 'elif ' and 'else' code does not work

score = input("What is your score? ")
if score == str(100):
    print('Perfect!')
elif score <= str(range(95, 99)):
    print('Great!')
elif score <= str(range(90, 95)):
    print('Good')
else:
    print('Fail')

It works when I type 95 to 100, but it doesn't work when I type other numbers.

Aucun commentaire:

Enregistrer un commentaire