Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a PYTHON program that asks the user to enter five test scores. The program should display a letter grade for each score and the
Write a PYTHON program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Design the following functions in the program:
-
calcAverageThis function should accept five test scores as arguments and return the average of the scores.
-
determineGradeThis function should accept a test score as an argument and return a letter grade for the score (as a String), based on the following grading scale:
- Round the average to one digit to the right of the decimal point. This should be done in themain()procedure.
- The function determine_grade():
- Should only take one argument, and thus only one parameter. That argument should be a single numeric test score.
- Should return the single letter grade that corresponds to the numeric test score that was passed in as an argument.
- The function calc_average():
- Should take five arguments, and thus five parameters. There should be one argument for each of the five test scores.
- Should return the average all five test scores.
- Do not put your print statements inside of your functions. Instead your functions should return the calculated value to the calling procedure (probably main()), and the calling procedure will print the results.
- Grading Scale:
- 90-100 - A
- 80-89 - B
- 70-79 - C
- 60-69 - D
- Below 60 - F
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started