Question: 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
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
Get step-by-step solutions from verified subject matter experts
