Question: 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
Get step-by-step solutions from verified subject matter experts
