Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming Practice 4.3: Average Rainfall 10 pts Not Submitted Due Feb 16, 2020 at 11:59 PM Submission Types Website URL Submission & Rubric Description Lesson

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Programming Practice 4.3: Average Rainfall 10 pts Not Submitted Due Feb 16, 2020 at 11:59 PM Submission Types Website URL Submission & Rubric Description Lesson Objective(s): Using nested loop statements Using calculations with loops Lesson: 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 12 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 period. Assignment Requirements: Upload your .py file to Git Hub and submit the link to that file. Hint: for the inner loop, use a for loop that goes through a list of month names. Sample results: This program will calculate total rainfall and average monthly rainfall for a period of years. How many years would you like to collect data for? 2 Year number 1 How much rain fell during the month of January? 2 How much rain fell during the month of February? 2 How much rain fell during the month of March? 2 How much rain fell during the month of April? 3 How much rain fell during the month of May? 1 How much rain fell during the month of June? 2 How much rain fell during the month of July? 3 How much rain fell during the month of August? 1 How much rain fell during the month of September? 4 How much rain fell during the month of October? 3 How much rain fell during the month of November? 2 How much rain fell during the month of December? 1 Year number 2 How much rain fell during the month of January? 2 How much rain fell during the month of February? 4 How much rain fell during the month of March? 5 How much rain fell during the month of April? 3 How much rain fell during the month of May? 2 How much rain fell during the month of June? 3 How much rain fell during the month of July? 2 How much rain fell during the month of August? 1 How much rain fell during the month of September? 2 How much rain fell during the month of October? 3 How much rain fell during the month of November? 4 How much rain fell during the month of December? 3 The total amount of rainfall was: 60.00 inches The average monthly rainfall was: 2.50 inches

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

What processes are involved in perceiving?

Answered: 1 week ago