Question: 5 . 2 8 ( Ch 5 ) Cincinnati October Precipitation Write a program that reads a series of recent Cincinnati rainfall amounts for the

5.28(Ch 5) 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 floating-point numbers.
The first number input (if any) is the rainfall amount in October 2019, the second number input (if any) is the rainfall amount in October 2018, etc.
The input ends when the user enters -1; 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:
3.6
1.7
4.8
2.9
4.3
-1
Then the output is:
The rainfall amounts you entered are [3.6,1.7,4.8,2.9,4.3].
Average rainfall amount 3.46.
Minimum rainfall amount 1.70.
Maximum rainfall amount 4.80.
Rainfall amounts less than the average:
1.70 inches in 2018.
2.90 inches in 2016.

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 Programming Questions!