Workout #15: Rainfall
Write a function, get_rainfall, that tracks rainfall in a number of cities. Users of your program will enter the name of a city; if the city name is blank, then the function prints a report before exiting.
If the city name isn’t blank, then the program should also ask the user how much rain has fallen in that city (typically measured in millimeters). After the user enters the quantity of rain, the program again asks them for a city name, rainfall amount, and so on — until the user presses Enter instead of typing the name of a city.
When the user enters a blank city name, the program exits — but first, it reports how much total rainfall there was in each city.
Boston
5
New York
7
Boston
5
[Enter; blank line]
the program should output
Boston: 10
New York: 7
TRY IT YOURSELF
ANSWER
https://colab.research.google.com/drive/16b3ncf0PFoqPCWc96xVpKDnNeBWR27Bv?usp=sharing