Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Auto Grader that converts students percentage into preset grades.
- #Uses loops, variables, input and logic.
- while True:
- print('You can calculate "Grade" or "Quit"')
- choice = input('What would you like to do? ')
- if choice == 'Grade':
- print('This application will calculate a students grade.')
- result = input ('Enter students exam percentage here...')
- if int (result) < 10:
- print('Students grade is calculated as: Unmarked')
- elif int (result) >=10 and int (result) <30:
- print('Students grade is calculated as: E')
- elif int (result) >=30 and int (result) <50:
- print('Students grade is calculated as: D')
- elif int (result) >=50 and int (result) <60:
- print('Students grade is calculated as: C')
- elif int (result) >=60 and int (result) <80:
- print('Students grade is calculated as: B')
- elif int (result) >=80 and int (result) <=100:
- print('Students grade is calculated as: A')
- elif choice == 'Quit':
- print ('Good Bye!')
- break
- else:
- print ('\nInvalid input!\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement