Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that: asks the user to enter five test scores. accepts grades that are greater than zero and less or equal to 100.

Write a program that: asks the user to enter five test scores. accepts grades that are greater than zero and less or equal to 100. displays a letter grade for each score and the average test score. Check the sample run for clarification. Your program must have the following functions: getScore. This function should prompt the user to enter one score and return the score after it validates it. Notice that this function is called 5 times in main. calcAverage. This function should accept five test scores as arguments and return the average of the scores. determineGrade. This function should accept a test score as an argument and return a letter grade for the score based on the following grading scale: 90100 A, 8089 B, 7079 C, 6069 D, Below 60 F. Notice you need if elif else statements in this function. main. This function should call the other three functions and print out the output. Sample run: Enter score: 60 Enter score: 95 Enter score: 300 Enter a valid score: 87 Enter score: 75 Enter score: 99 score numeric grade letter grade ---------------------------------------------------- score 1: 60.0 D score 2: 95.0 A score 3: 87.0 B score 4: 75.0 C score 5: 99.0 A ---------------------------------------------------- Average score: 83.2 B

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

x-3+1, x23 Let f(x) = -*+3, * Answered: 1 week ago

Answered: 1 week ago