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