Question
def rainfall (): ------------------------------------------------------- Asks the user for daily rainfall (in mm) from the keyboard. The function stops asking for rainfall when the user
def rainfall():
"""
-------------------------------------------------------
Asks the user for daily rainfall (in mm) from the keyboard.
The function stops asking for rainfall when the user enters -1.
The function returns:
the total number of dry days (rainfall lower than 4mm)
the total number of damp days (rainfall 4mm - 8mm)
the total number of wet days (rainfall greater than 8mm)
the average rainfall for all days (rounded down)
Do all inputs and calculations in integer.
Use: dry_days, damp_days, wet_days, avg = rainfall()
-------------------------------------------------------
Returns:
dry_days - number of dry days (int)
damp_days - number of damp days (int)
wet_days - number of wet days (int)
avg - average rainfall of all days (int)
-------------------------------------------------------
"""
# your code here
return
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started