mercredi 20 octobre 2021

Python3...why is it printing F when any number is inputted? I'm learning and cannot figure out what I've done wrong here,

score = input("Enter Score: ")
score = float()
if score >= 0.9 :
    print ('A')
elif score >= 0.8 :
    print ('B')
elif score >= 0.7 :
    print ('C')
elif score >= 0.6 :
    print ('D')
elif score < 0.6 :
    print ('F')
elif score < 0.0 :
    print ('error')
else:
    print ('Out of Range')

#I cannot figure out why no matter which number I give it, it returns F

Aucun commentaire:

Enregistrer un commentaire