-
-
Save Mohamed2del/a69a57dde82453a963c86af915b08feb to your computer and use it in GitHub Desktop.
score = input("Enter Score: ") | |
s = float(score) | |
x = 'Error' | |
if s >= 0.9: | |
x = 'A' | |
elif s >=0.8: | |
x='B' | |
elif s >=0.7: | |
x='C' | |
elif s >= 0.6: | |
x='D' | |
elif s < .6: | |
x ='F' | |
else: | |
x ="Out of Range" | |
print (x) | |
score = input("Enter Score: ")
try:
s = float(score)
except:
print("Out of range")
quit()
if s > 1.0:
print("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")
else:
print("Out of range")
score = input("Enter Score: ")
s = float(score)
if 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')
else:
print(" Out of range ")
score = input("Enter Score: ")
try:
s = float(score)
except:
print("Please type a numeric value in between 0.0 - 1.0")
quit()
if s > 1.0 or s < 0:
print("Please enter a grade in range of 0.0 - 1.0")
quit()
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")
elif s > 1.0 or s < 0:
print("Please enter a grade in range of 0.0 - 1.0")
quit()
xx= input("enter the grade: ")
x= float(xx)
if x > 1:
print("Number is out of Range")
print("Enter number between 0.0 to 1.0")
elif x <=0:
print("Number is out of Range")
print("Enter number between 0.0 to 1.0")
elif x >=0.9:
print("A")
elif x >= 0.8 :
print("B")
elif x >= 0.7 :
print("C")
elif x >= 0.6:
print("D")
elif x < 0.6:
print("F")
**Hope so it works ** suggestions are appreciated at [email protected]