Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON Write a short code Write a Python function named moderateDays that is given a dictionary containing the average daily temperature for each day of

PYTHON Write a short code

Write a Python function named moderateDays that is given a dictionary containing the average daily temperature for each day of a week, and returns a list of the days in which the average temperature was between 70 and 79 degrees. An example of the daily temperature for the week is the followings:

Sunday  68.8 Monday  70.2 Tuesday  67.2 Wednesday  71.8 Thursday  73.2 Friday  75.6 Saturday  74.0 

Create a dictionary using the daily temperature from above and call moderateDay function from the main level script section. The moderateDay function should take a dictionary parameter and return a list. Print out the list after the function returns. It should look like the following:

['Monday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']

Your program should work for any dictionary using similar daily temperature format.

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_2

Step: 3

blur-text-image_3

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

Contemporary Issues In Database Design And Information Systems Development

Authors: Keng Siau

1st Edition

1599042894, 978-1599042893

More Books

Students also viewed these Databases questions

Question

How can a firm successfully undertake price discrimination

Answered: 1 week ago