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: Your Question :help  please answer in text form with proper workings and explanation for each and…
Q: Your Question :help  please answer in text form with proper workings and explanation for each and…
Q: On January 1, 2023, Pulaski, Incorporated, acquired a 60 percent interest in the common stock of…
Q: Exercises: 5.Lasse has an ice-cream stall. The budgeted costs for the following year are as follows:…
Q: Calculate the concentration of sodium ions in a solution prepared by diluting 81.00 mL of 0.180 M…
Q: Don't use chatgpt will upvote
Q: Mercury is often used in thermometers. The mercury sits in a bulb on the bottom of the thermometer…
Q: Please correct answer and don't use hend raiting
Q: The Sweetwater Candy Company would like to buy a new machine that would automatically "dip"…
Q: ! Required information [The following information applies to the questions displayed below.] Nick's…
Q: Please show reaekson and don't use hend raiting
Q: An investor is considering the acquisition of a "distressed property" which is on Northlake Bank's…
Q: Please correct answer and don't use hend raiting
Q: In Germany, which of the following properly describes aspects of Statutory Health Insurance? Covers…
Q: Please correct answer and don't use hend raiting
Q: Please correct answer and don't use hend raiting
Q: Please correct answer and don't use hend raiting
Q: Please correct answer and don't use Ai solution
Q: Please correct answer and don't use hend raiting
Q: Identify the following as a Lewis acid or Lewis base or both. N A B A [Select] Al O C D ▾ B [Select]…
Q: Four point charges have the same magnitude of 1.9 × 10-12 C and are fixed to the corners of a square…