Advertisement
Guest User

Untitled

a guest
Jul 11th, 2012
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. def computegrade(score):
  2.     if(float(score)>=1.0 or float(score)<=0.0):
  3.         return 'Bad Score'
  4.     if float(score)==0.9:
  5.         return 'A'
  6.     elif float(score)==0.8:
  7.         return 'B'
  8.     elif float(score)==0.7:
  9.         return 'C'
  10.     elif float(score)==0.6:
  11.         return 'D'
  12.     elif float(score)<0.6:
  13.         return 'F'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement