Question: 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

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!