write a program that asks the user to enter five test scores. the pogram should display a letter grade for each score and the average test score. write the following function in the program.
calc_average-this function should accept five test scores as a argument and return the average of the scores
determine_grade - this function should accept a test score as an argyment and return a letter grade for the score, based on the following grading.

``````score                        letter grade
90-100                              a
80-89                               b
70-79                           c
60-69                           d
below 60                        f
``````

Print grades for all individual tests and for the average test score. You must calculate grades in a function that has the test scores passed to it, one at a time
Have an additional function that accepts the score. The score must be at least 0 and no more than 100. All scores must be validated in a separate function that has the scores passed to it, one at a time.
The program should print out 4.0 instead of an “A”, 3.0 instead of a “B”, 2.0 instead of a “C”, 1.0 instead of a “D” and 0.0 instead of an “F”

Edited by pyTony: Bad format fixed

3
Contributors
2
Replies
28
Views
4 Years
Discussion Span
Last Post by vegaseat

Sounds good excersise, good luck.

Hint ...

``````# using module bisect to determine grades

import bisect

# both sequences have to be sorted or be in order
# A is 85 or higher, B is 75 to 84 etc.
breakpoints = [30, 44, 66, 75, 85]