-
-
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) | |
this is the best one
score = input("Enter Score: ")
try:
s = float(score)
except:
print("Bad score")
quit()
if s > 1.0:
print("Bad score, Enter a valid score")
quit()
if s < 0.0:
print("Bad score, Enter a valid score")
quit()
elif s >= 0.9:
print("A")
elif s < 0.9 and s >= 0.8:
print("B")
elif s < 0.8 and s >= 0.7:
print("C")
elif s < 0.7 and s >= 0.6:
print("D")
elif s < 0.6:
print("F")
else:
print("Bad score")
score = input("Enter Score: ")
try:
s = float(score)
except:
print("Bad score")
quit()
if s > 1.0 or s < 0.0:
print("Bad score, Enter a valid score")
quit()
elif s >= 0.9:
print("A")
elif s >= 0.8 and s < 0.9:
print("B")
elif s >= 0.7 and s < 0.8:
print("C")
elif s >= 0.6 and s < 0.7:
print("D")
else:
print("F")
score = input('Enter the score:')
try:
float(score)
if float(score)>1.0 or float(score)<0:
print('Bad score')
elif float(score) >= 0.9 :
print('A')
elif float(score) >= 0.8:
print('B')
elif float(score) >= 0.7:
print('C')
elif float(score) >= 0.6:
print('D')
else :
print('F')
except:
print('Bad score')
score = input("Enter Score: ")
try:
Fscore = float(score)
except:
print("Enter Numeric Number")
quit()
if Fscore >= 1.0:
if Fscore < 0.0:
print("Enter Value Between 0.0 and 1.0")
quit()
if Fscore >= 0.9:
print("A")
elif Fscore >= 0.8:
print("B")
elif Fscore >= 0.7:
print("C")
elif Fscore >= 0.6:
print("D")
elif Fscore < 0.6:
print("F")
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)
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()
this works. great job!! thank you