Advertisement
Guest User

Untitled

a guest
Jul 7th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. # ============================
  2. # Coursera practicing script
  3. # Python for Informatic Book
  4. # CHAPTER 3
  5. # ============================
  6. # EX3.3
  7.  
  8.  
  9. score_inp = raw_input("Score 0.0 to 1.0: ")
  10.  
  11. try:
  12. score = float(score_inp)
  13.  
  14. if 0.9 <= score <= 1:
  15. print "A"
  16. elif 0.8 <= score < 0.9:
  17. print "B"
  18. elif 0.7 <= score < 0.8:
  19. print "C"
  20. elif 0.6 <= score < 0.7:
  21. print "D"
  22. elif 0.6 < score < 0.6:
  23. print "F"
  24. else:
  25. print "Bad score"
  26. except:
  27. print "Typed numbers on the range"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement