Question: The Problem Design a program that lets the user enter the total rainfall for each of 12 months into an array(list). The program should calculate
The Problem Design a program that lets the user enter the total rainfall for each of 12 months into an array(list). The program should calculate and display the total rainfall for the year, the average monthly rainfall. The Assignment Write pseudo-code and a Python program that contains three modules/functions as follows: Module main(). Calls the functions enterRain and rainStats. The array returned from enterRain should be assigned to a variable monthlyRain. monthlyRain should be passed to rainStats. Module enterRain(). Uses a loop to allow the user to enter rainfall for each of 12 months. Each rainfall should be assigned to an array monthlyRain. monthlyRain should be returned to main() after rainfall for each month has been entered. Module rainStats(monthlyRain). Accepts the array monthRain. Calculates a total for the year and an average rainfall per month from monthlyRain. Displays the total rainfall for the year and the average rainfall for each month.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
