Question: Python script Needing to edit dictionaries is not very common, but sometimes it is useful. Write a function named get_older that consumes a dictionary (representing

Python script

Needing to edit dictionaries is not very common, but sometimes it is useful. Write a function named get_older that consumes a dictionary (representing a person) and increases its "Age" key's value by 1. The function should return the new age. Call the function on the two given person dictionaries to advance their ages, and print their returned values.

person1 = {"Name": "Charles Babbage", "Age": 17} person2 = {"Name": "Ada Lovelace", "Age": 32}

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!