Question: Python help Output Repetition Structures-Average Rainfall In this assignment, you will be using looping structures to collect data and calculate the average rainfall over a
Repetition Structures-Average Rainfall In this assignment, you will be using looping structures to collect data and calculate the average rainfall over a period of years. The program should first ask for the number of years. The outer loop will iterate once for each year. The inner loop will iterate twelve times, once for each month. After all iterations, the program should display the number of months, the total inches of rainfall, and the average rainfall per month for the entire period. You should also allow the user to stop execution of the script by entering a value of 999" during the month loop Welcome to the Average Rainfal Calculator Enter the number of years: 1 For year 1 Enter the rainfall amount for the month L. Enter 999 to stop program: 1 Enter the rainfall amount for the month 2 Enter 999 to stop program: 2 Enter the rainfall amount for the month 3. Enter 999 to stop program: 3 Enter the rainfall amount for the month 4. Enter 999 to stop program: 1 Enter the rainfall amount for the month 5. Enter 999 to stop program: 2 Enter the rainfall amount for the month 6. Enter 999 to stop program.: 3 Enter the rainfall amount for the month 7. Enter 999 to stop program.: 1 Enter the rainfall amount for the month &. Enter 999 to stop program. 2 Enter the rainfall amount for the month 9. Enter 999 to stop program.: 3 Enter the rainfall amount for the month 10. Enter 999 to stop program.: I Enter the rainfall amount for the month 11. Enter 999 to stop program: 2 Enter the rainfall amount for the month 12. Enter 999 to stop program: 3 For 12 months Total rainfal: 24.00 inches Average monthly rainfall: 200 inches RSLR -... RESTART _
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
