Question: python please Define a function named get_average (a_dict) which takes a dictionary as a parameter. The function returns a new dictionary where the keys are

python please python please Define a function named get_average (a_dict) which takes a dictionary

Define a function named get_average (a_dict) which takes a dictionary as a parameter. The function returns a new dictionary where the keys are the same keys as the parameter dictionary but the values are the average of the list of numbers of the corresponding key. Round the average value to 2 decimal places. nion For example: Test Result dict. { 1:51. ''[8), 110, 3, 5, 5 > 1 15.0 result - set_averagela_dict) 13.0 for key in sorted result.keys()) print(key, '', result[key]) Answer: (penalty regime: 0 %) 1 def get_average(a dict): 2 for item in a dict: 3 for key in item: 4

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!