Question: Problem 2 Write a program that by using a loop to ask the user to enter three valid test scores, then store the valid test

 Problem 2 Write a program that by using a loop to

Problem 2 Write a program that by using a loop to ask the user to enter three valid test scores, then store the valid test scores in a list. The program should display a letter grade for each score and the average test score. Write the following functions in the program: get_valid_score: This function takes no arguments. It should prompt the user to input a test score and then validate the score (if the score is less than 0 or greater than 100, then ask user re-enter a score, until user enter a valid one), finally the function returns the valid input. Use a while loop to validate the input. calc_average: This function should accept three test scores as arguments and return the average of the score. determine_grade: This function should accept a test score as an argument and return a letter grade for the score base on the following grading scale. Score Letter Grade 90-100 A 80-89 B 70-79 60-69 D 0-59 F Note: you should first define these functions, and then use them in the appropriate place to match the desired description of the program. Example Please enter a test score: 110 That is not a valid score Please enter a test score: 90 This student recieved a(n) A on the test Please enter a test score: 78 This student recieved a(n) C on the test Please enter a test score: -4 That is not a valid score Please enter a test score: 86 This student recieved a(n) B on the test The average of the 3 test scores was 84.67

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!