Answered step by step
Verified Expert Solution
Question
1 Approved Answer
9.9 (LAB)Temperature Dictionary (Python 3) ( Dictionaries and Sets) Create a function called temperature that takes one argument called temps. temps is a list of
9.9 (LAB)Temperature Dictionary (Python 3) ( Dictionaries and Sets)
Create a function called temperature that takes one argument called temps. temps is a list of recorded temperatures. Your function should return a dictionary where the key is the tens and hundreds of the temperatures and the value is a list of the temperatures in that range. ( 4 pts )
temps = [98, 62, 94, 102, 94] result = temperature(temps)
result will contain a dictionary. {90:[98, 94, 94], 60:[62], 100:[102]} Make sure you write a docstring for your function as well. (1 pt)
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