Test Average and Grade Write a 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. Write the following functions in the program: calc_average. This function should accept five test scores as arguments and return the average of the scores. determine_grade. This function should accept a test score as an argument and return a letter grade for the score based on the following grading scale: Score Letter Grade 90–100 A 80–89 B 70–79 C 60–69 D Below 60 F Write the following functions: getTestScore(): This function prompts user for five test scores and returns test score to the caller. calcAverage(): This function accepts five test scores as arguments and returns the average of the five test scores. determineGrade(): This function accepts an average as an argument and returns a letter grade for the score based on the grading scale. displayData(): This method displays all five test scores, average and the letter grade with appropriate labels. Submit the following: An algorithm A complete Python Program (including documentation) Output Test Data: Test Score 1 70 Test Score 2 85 Test Score 3 95 Test Score 4 90 Test Score 5 88
Test Average and Grade Write a 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. Write the following functions in the program: calc_average. This function should accept five test scores as arguments and return the average of the scores. determine_grade. This function should accept a test score as an argument and return a letter grade for the score based on the following grading scale:
Score Letter Grade
90–100 A
80–89 B
70–79 C
60–69 D
Below 60 F
Write the following functions:
- getTestScore(): This function prompts user for five test scores and returns test score to the caller.
- calcAverage(): This function accepts five test scores as arguments and returns the average of the five test scores.
- determineGrade(): This function accepts an average as an argument and returns a letter grade for the score based on the grading scale.
- displayData(): This method displays all five test scores, average and the letter grade with appropriate labels.
Submit the following:
- An
algorithm - A complete Python Program (including documentation)
- Output
Test Data:
Test Score 1 |
70 |
Test Score 2 |
85 |
Test Score 3 |
95 |
Test Score 4 |
90 |
Test Score 5 |
88 |
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 3 images