Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code it in Python Write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. The

image text in transcribed
Code it in Python 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 period. Input Validation: Do not accept a number less than 1 for the number of years Do not accept negative numbers for the monthly rainfall. Focus on: Properly written pseudocode o includes comments and no specific language syntax o shows input and validation of input oshows repetition (loop) structure o shows output Intro and description of program displayed User friendliness of program in general Variables and constants used o Declaration o Initialization o Used in nrocessing

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

Microsoft Visual Basic 2005 For Windows Mobile Web Office And Database Applications Comprehensive

Authors: Gary B. Shelly, Thomas J. Cashman, Corinne Hoisington

1st Edition

0619254823, 978-0619254827

More Books

Students also viewed these Databases questions

Question

Explain what is meant by the terms unitarism and pluralism.

Answered: 1 week ago