# # shows the use of an if-statement and the use of a # parameter for a function # # written by e.bonakdarian mar 2010 def printGrade(points): # print the correct grade based on the points # standard 90, 80, 70 .. distribution # we assume 'points' >= 0 if points >= 90: print 'A' elif points >= 80 and points < 90: print 'B' elif points >= 70 and points < 80: print 'C' elif points >= 60 and points < 70: print 'D' else: print 'F' def main(): points = input('Enter points: ') printGrade(points) main() raw_input('\n to exit')