Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program that calculates the average of all quiz grades entered by the user and prints the total number of quizzes, quiz total, lowest

Create a program that calculates the average of all quiz grades entered by the user and prints the total number of quizzes, quiz total, lowest quiz grade and quiz average. The program will not know how many quizzes the user will enter. The user will enter the sentinel value of -77 when the user has completed entering quiz grades. The program will utilize a while loop to keep a running total of quiz grades and determine the lowest quiz grade. Before the loop, get the first quiz grade from the user. This first value might be the sentinel value of -77 if the user does not have any quiz grades to enter. The loop header will check whether the quiz grade entered is not equal to -77. Within the loop, the quiz grade will be added to the running total. The user will be prompted for the next quiz grade and the program will obtain the grade the user enters. The program will also need to keep track of the number of quizzes the user enters. This can be accomplished by using a variable that is incremented by 1 within the loop. The user will enter the value -77 when there are no more grades to enter. This value of -77 will terminate the loop. The loop condition must be constructed to check for the value of -77. Within the loop, also keep track of the lowest quiz grade. Set a variable equal to the first quiz grade entered by the user (this is done before the loop begins) and use an if statement within the loop to compare that value to each additional quiz grade entered to determine if the newer grade is lower. The lowest quiz grade will be printed after the loop completes. Make sure the lowest grade is not the sentinel value. When the loop has completed, if at least one quiz grade has been entered, the program will print to the screen the total number of quizzes, the quiz total, the lowest quiz grade and the average of the quiz grades to 2 numbers after the decimal. An average is computed by dividing the quiz total by the number of quizzes. The average should be a floating-point number. If no quiz grades have been entered, print No quiz grades have been entered(solve using python)

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

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions

Question

Write a short paper on ERPs. What's happening; what's coming.

Answered: 1 week ago