Write a program that is given a dictionary containing the average daily temperature for each day of the week, and prints all the days on which the average temperature was between 40 and 50 degrees.
TEMPERATURE = {
"Monday":33,
"Thursday":40,
"Wednesday":45,
"Thursday":38,
"Friday":50,
"Saturday":44,
"Sunday":35
}
for day, temp in TEMPERATURE.items():
if temp < 50 and temp > 40:
print(day)
output:
Wednesday
Saturday
Comments
Post a Comment