Skip to content

Instantly share code, notes, and snippets.

  • Save som983/6b4c1af6c0c915d60f94fab5b5bdf407 to your computer and use it in GitHub Desktop.
Save som983/6b4c1af6c0c915d60f94fab5b5bdf407 to your computer and use it in GitHub Desktop.
score = input("Enter Score: ")
try:
s=float(score)
except:
print("Error,value out of range") # if type is not float
quit()
if s>=1.0 or s<0.0:
print("Value out of range") #if the value is out of range
elif s>=0.9:
print('A')
elif s>=0.8:
print('B')
elif s>=0.7:
print('C')
elif s>=0.6:
print('D')
elif s<0.6:
print('F')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment