Question: 5 . 2 8 ( Ch 5 ) Cincinnati October Precipitation Write a program that reads a series of recent Cincinnati rainfall amounts for the
Ch Cincinnati October Precipitation
Write a program that reads a series of recent Cincinnati rainfall amounts for the month of October, and prints some statistics based on the input read.
Input:
The program will read rainfall amounts in inches, as floatingpoint numbers.
The first number input if any is the rainfall amount in October the second number input if any is the rainfall amount in October etc.
The input ends when the user enters ; that is not a real rainfall amount, it is just a sentinel value to represent the end of the user input.
All the rainfall amounts entered must be accumulated into a list.
Processing and output:
Print the list of all rainfall amounts entered.
Find and print the average of the rainfall amounts in the list print with two decimals.
Report the lowest and the highest rainfall amount print with two decimals.
Iterate through the list to find and print the rainfall amounts that are below the average calculated before.
Ex: If the input is:
Then the output is:
The rainfall amounts you entered are
Average rainfall amount
Minimum rainfall amount
Maximum rainfall amount
Rainfall amounts less than the average:
inches in
inches in
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
