Question: Saved BlockPy: #42.7) Sum Dictionary The following function sum_dictionary is meant to consume a dictionary of lists and return a dictionary of numbers representing the

 Saved BlockPy: #42.7) Sum Dictionary The following function sum_dictionary is meant

Saved BlockPy: #42.7) Sum Dictionary The following function sum_dictionary is meant to consume a dictionary of lists and return a dictionary of numbers representing the sum of the elements in the list. For example, in the function call below, the dictionary f"Module 1" 23, "Module 2": 22, "Module 3" 31 should be returned Server Execution: Ready However, the function definition has had all of its code moved to before its definition. Rearrange the lines of code before the definition to be inside the definition, and correct their indentation. Do not add, remove, or change any of those lines Console Feedback: Ready Run BlocksSplTextReset UploadZ History for key, values in a dictionary.items(): new -1) 3 for value in values: new[key]-0 5 new[key] - 6 return new 7 def sum dictionary(a_dictionary): = new [key] + value pass 10 print (sum diction ary( "Module1" [10, 5, 3, 5, "Module 2": [7, 3, 4, 5, 31, "Module 3": [10, 12, 4, 3, 2] 12 13

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!