Question: NOTE : Is learning Python programming (currently on chapter 4) with the following textbook: Book Starting Out With Python 3rd Edition by Gaddis
NOTE: Is learning "Python programming" (currently on chapter 4) with the following textbook:
Book "Starting Out With Python" 3rd Edition by Gaddis


1. Write a program that uses nested loops 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. Each iteration of the inner loop will ask the user for the inches of rainfall for that 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 eriod. /workspace/HW/ $ python number01.py How many vears to calculate? 2 Enter data for vear 1 How much rain fell in month 1? 10 How much rain fell in month 2? 20 How much rain fell in month 3? 30 How much rain fell in month 4? 40 How much rain fell in month 5? 50 How much rain fell in month 6? 60 How much rain fell in month 7? 70 How much rain fell in month 8? 80 How much rain fell in month 9? 90 How much rain fell in month 10? 100 How much rain fell in month 11? 110 How much rain fell in month 12? 120 Enter data for year 2 How much rain fell in month 1? 1 How much rain fell in month 2? 2 How much rain fell in month 3? 4 How much rain fell in month 4? 5 How much rain fell in month 5? 3
Step by Step Solution
There are 3 Steps involved in it
To fix the program and ensure it accurately calculates the average rainfall over a period of years a... View full answer
Get step-by-step solutions from verified subject matter experts
