Ex3
unknown
python
3 years ago
565 B
12
Indexable
#!/usr/bin/env python3
def getgrade(score):
if score >= 1:
return "Bad Score"
else:
if score >= 0.9:
return "A"
else:
if score >= 0.8:
return "B"
else:
if score >= 0.7:
return "C"
else:
if score >= 0.6:
return "D"
else:
return "Bad Score"
score = float(input('\nWhat is the Score?: '))
print(getgrade(score))
Editor is loading...