Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The average rainfall in {CITY NAME) is {MEAN) mm. Sample input/output: Input Output EXPAND Halifax The average rainfall in Halifax is 105 mm. 1 question

The average rainfall in {CITY NAME) is {MEAN) mm.\" Sample input/output: Input Output EXPAND Halifax The average rainfall in Halifax is 105 mm. 1 question saved O remaining + Back: To Instructions Next: Review & Submit 10:14 10 1988 76% M AA class.mimir.io vveek 7-P... 7 Saved 5 points possible Reset to Starter Code Question 1 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 EXPAND 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)) 1 question saved O remaining + Back: To Instructions Next: Review & Submit ?

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_2

Step: 3

blur-text-image_3

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

Introduction To Probability And Statistics

Authors: William Mendenhall, Robert Beaver, Barbara Beaver

14th Edition

1133103758, 978-1133103752

More Books

Students also viewed these Programming questions

Question

Is this the best time to buy?

Answered: 1 week ago