Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

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

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions

Question

Define Administration and Management

Answered: 1 week ago

Question

Define organisational structure

Answered: 1 week ago

Question

Define line and staff authority

Answered: 1 week ago

Question

Define the process of communication

Answered: 1 week ago

Question

Explain the importance of effective communication

Answered: 1 week ago

Question

9. Understand the phenomenon of code switching and interlanguage.

Answered: 1 week ago