Question: 5 . 1 6 ( Ch 5 ) LAB: Output stats on the values in a list Write a program that first gets a list
Ch LAB: Output stats on the values in a list
Write a program that first gets a list of grades from input all grades will be of the integer type. The input begins with an integer indicating the number of grades that follow. Then, output:
the list of the grades,
the average of the grades in the list, and
all the grades below the average.
Note: your code must use for loops for reading input and grade filtering.
Ex: If the input is:
Then the output is:
The grades you input are
The average of the grades is
The grades below average are:
The indicates that there are six grades to read, namely The program must then:
build a list with those numbers,
find and print the average of the grades in the list print with two decimals
iterate through the list to find and print the grades that are below the average calculated before.
You can assume that at least grade will be provided.
Rubric:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
