Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a complete program to show if there are restrictions on water use in Ottawa, Toronto, and Montreal. This program will also calculate the average

image text in transcribed
Write a complete program to show if there are restrictions on water use in Ottawa, Toronto, and Montreal. This program will also calculate the average rainfall of these 3 cities. Your program should include two functions. Call the first function that will determine whether there are restrictions on water use. It will return the character 'y' if there was less than 4 inches of rain, and 'n' otherwise. Call the second function to calculate the average rainfall. The following is an output sample. Your program should output the data in this manner as well: name of city rainfall restrictions in place? Ottowa Montreal Toronto yes no no 10 Average rainfall of 3 cities is 7 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_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

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

=+j Enabling a productive global workforce.

Answered: 1 week ago

Question

=+ Are you interested in creating or

Answered: 1 week ago