Question: Problem 3 Write a program that prompts the user to enter grades and stores all of these grades in a list. When the user enters

Problem 3 Write a program that prompts the user to enter grades and stores all of these grades in a list. When the user enters a negative value, print out the mean and standard deviation of all grades to 2 decimal places and end the program. If the user entered a negative value as the first value, instead print a message that mean and standard deviation are undefined. The mean of n numbers x1, x2, ..., xn equals (x1 + x2 + ... + xn) / n, and the standard deviation of these numbers is sqrt(1/n * ((x1 - u)^2 + (x2 - u)^2 + ... + (xn - u)^2)), where u represents the mean. Sample output: Enter class grades (-1 when finished): 100 90 80 70 60 -1 Mean: 80.00 Standard deviation: 14.14

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!