Question: Consider the following scenario about using Python dictionaries:A teacher is using a dictionary to store student grades. The grades are stored as a point value

Consider the following scenario about using Python dictionaries:A teacher is using a dictionary to store student grades. The grades are stored as a point value out of 100.Currently, the teacher has a dictionary setup for Term 1 grades and wants to duplicate it for Term 2. The studentname keys in the dictionary should stay the same, but the grade values should be reset to 0.Complete the "setup_gradebook" function so that input like ""J ames": 93, "Felicity": 98, "Barakaa": 8o}" willproduce a resulting dictionary that contains ""James": 0, "Felicity": 0, "Barakaa": 0)". This function should:1. accept a dictionary "old_gradebook" variable through the function's parameters;2. make a copy of the "old_gradebook" dictionary;3. iterate over each key and value pair in the new dictionary;4. replace the value for each key with the number 0;5. return the new dictionary.124567891e1112def setup gradebook (old gradebook) :# Use a dictionary method to create a new copy of the "old gradebook".# Complete the for loop to iterate over the new gradebook.for# Use a dictionary operation to reset the grade values to e.return new gradebookfall_gradebook =("James" : 93, "Felicity" : 98, "Barakaa": 80}print(setup_gradebook (fall_gradebook))# Should output ampc
 Consider the following scenario about using Python dictionaries:A teacher is using

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!