-
-
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) | |
print('Enter A Score Between 0.0 and 1.0')
score=float(input())
if score>=0.9 and score<=1.0:
print('A')
elif score>=0.8 and score<0.9:
print('B')
elif score>=0.7 and score<0.8:
print('C')
elif score>=0.6 and score<0.7:
print('D')
elif score<0.6:
print('F')
else:
print('Bad Score')
score = input("Enter Score: ")
s = float(score)
if s > 1.0:
print('error')
elif s == 1.0:
print('A')
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')
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]
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()
s=input("score")
sc=float(s)
x=("error")
if sc >1:
print(x)
exit()
elif sc >= 0.9:
x= ('A')
elif sc >= 0.8:
x = ('B')
elif sc >= 0.7:
x = ('C')
elif sc >= 0.6:
x = ('D')
elif sc < 0.6:
x = ('F')
else:
x=("error message")
print(x)