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

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question

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:

  1. getTestScore(): This function prompts user for five test scores and returns test score to the caller.
  2. calcAverage(): This function accepts five test scores as arguments and returns the average of the five test scores.
  3. determineGrade(): This function accepts an average as an argument and returns a letter grade for the score based on the grading scale.
  4. displayData(): This method displays all five test scores, average and the letter grade with appropriate labels.

 

Submit the following:

  1. An algorithm
  2. A complete Python Program (including documentation)
  3. Output

 

Test Data:

Test Score 1

70

Test Score 2

85

Test Score 3

95

Test Score 4

90

Test Score 5

88

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage

Expert Answers to Latest Homework Questions

Q: Evaluate the function f(x) = x² - 2x + 2 at the given values of the independent variable and…
Q: Use the graph to determine 2 a. intervals on which the function is increasing, if any. b. intervals…
Q: Use the graphs of f and g to find (fg)(1). -6 -4 6 4 -2 2 4 f(x) (X) 6 X Q G (fg)(1)=
Q: For f(x)=3x and g(x) = -x, find each of the following. a. (f+g)(-4) a. (f+g)(-4)= (Simplify your…
Q: The functions f and g are given. Evaluate fog and find the domain of the composite function fo g. 4…
Q: 13) Two bulbs are connected to an ideal battery, as shown below. Battery V bat Bulb B Bulb A Switch…
Q: If f(x)=5x-8, show that f(x) = 1 x+8 5 Select the correct choice below and fill in the answer…
Q: dy d²y Use implicit differentiation to find and for the dx dx2 equation 7 sin x + 4 cos y = 3. dy 7…
Q: Use the graph of the polynomial to solve P(x) > 0. y The solution set for P(x) > 0 is ☐ (Type your…
Q: PLEASE INCLUDE THE graphs of the corresponding experiments AND THE analysis. I have a macbook and…
Q: Which of the following evaluation metrics can be used to evaluate a model with categorical output…
Q: 2. Ferrous iron (Fe2+) must be removed from a steel plant wastewater to meet a pretreatment standard…
Q: Convert the following numbers. Please show the calculations in detail.
Q: The second step of the SDLC phase is to collect information on current hardware and software,…
Q: CA BCPS Links S Schoology x…
Q: S Grades | Schoology x Schoology x + → C PS Links S…
Q: Schoology X S Schoology x ค…
Q: Assume you are shopping for a new computer system.  (10 Pts) Find an ad for the system you want to…
Q: Assume you are shopping for a new computer system.  (10 Pts) Find an ad for the system you want to…
Q: sume&submissionId=1412172123 i! Dictoronary Spani... U5 L4 Show What You Know: Light Transmission…
Q: A discrete random variable X with the range (i.e. the set of all possible values) Rx = {0, 1, 2,…