Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ============================
- # Coursera practicing script
- # Python for Informatic Book
- # CHAPTER 3
- # ============================
- # EX3.3
- score_inp = raw_input("Score 0.0 to 1.0: ")
- try:
- score = float(score_inp)
- if 0.9 <= score <= 1:
- print "A"
- elif 0.8 <= score < 0.9:
- print "B"
- elif 0.7 <= score < 0.8:
- print "C"
- elif 0.6 <= score < 0.7:
- print "D"
- elif 0.6 < score < 0.6:
- print "F"
- else:
- print "Bad score"
- except:
- print "Typed numbers on the range"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement