One common grading scale takes the percentage score on an assignment--a number from 0 to 100--and converts it to a letter grade based on the following scale:
Percentage score | Letter grade
-----------------+--------------
90 - 100 | A
80 - 89 | B
70 - 79 | C
60 - 69 | D
0 - 59 | F
Write a program grade_identifier.py
that has a function convert_score()
. That function takes a percentage score as a parameter and returns the appropriate letter grade. The main()
part of the program should call the convert_score()
function with a few sample scores to demonstrate its output.
Sample output:
The grade 90 is a(n) A.
The grade 32 is a(n) F.
The grade 80 is a(n) B.