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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!