Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inp = raw_input('Please give score between 0.0 and 1.0: ')
- try:
- finp = float(inp)
- except:
- finp = -1
- if finp >= 0.0 and finp <= 1.0 :
- score = finp
- else:
- print 'Error, please insert valid score'
- quit()
- if score >= 0.9 :
- print 'A'
- elif score >= 0.8 :
- print 'B'
- elif score >= 0.7 :
- print 'C'
- elif score >= 0.6 :
- print 'D'
- elif score < 0.6 :
- print 'F'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement