Question: Given the following dictionary in Python: student _ data = { name: Alice, age: 1 5 , grade: A - } Perform the
Given the following dictionary in Python:
studentdata
"name": "Alice",
"age":
"grade": A
Perform the following operations stepbystep and present your final code:
Check if the key "grade" exists in the studentdata dictionary.
Print the value associated with the key "age" in the studentdata dictionary.
Add a new keyvalue pair to the studentdata dictionary, with the key "city" and the value "New York".
Print the updated studentdata dictionary.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
