Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

using python Instructions You will be given the name of a city followed by a set of integers representing the monthly rainfall (in millimeters) that

image text in transcribedusing python

Instructions You will be given the name of a city followed by a set of integers representing the monthly rainfall (in millimeters) that have happened in a given area over the past year. You will then calculate the average (mean) rainfall for the year. The mean is calculated by dividing the sum of the values in the set by the number of elements in the set mean of a set = sum of all elements number of elements E.g. The mean of the series 1, 2, 3, 4, 5 is 15/5=3 Output will be of the form: "The average rainfall in {CITY NAME) is (MEAN) mm. Details Input The program reads in the following each on a new line): A string, the name of a city Twelve integers, representing the monthly rainfall (in millimeters) for the given city over the past year. Processing You will calculate the integer) mean rainfall. Use the round() function to return an integer mean (e.g. integerMean=round (mean) ] Output Output the following where {CITY NAME) is replaced by the name of the city and (MEAN) is replaced by the calculated average (integer) rainfall: "The average rainfall in {CITY NAME} is {MEAN} mm. Sample input/output: Input Hallfax Output 98 111 108 107 The average rainfall in Halifax is 105 mm. 97 100 125 129 118 podl.py New * Full Screen Grading 5 Run Tests vi WNA 2# (SCT 1105 3 # Week 7. POD 1 # Mauthor. 22 a Test Case 0 NOT RUN Test Case 1 No niin NOT RUN Test Case 2 NOT RUN Test Case 3 NOT RUN e Test Case 4 NOT RUN

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

More Books

Students also viewed these Databases questions

Question

LOQ 11-14 What is achievement motivation?

Answered: 1 week ago

Question

What is topology? Explain with examples

Answered: 1 week ago