Question: Dictionary 1 Python questions: 1. Write a function called get item. Given an dictionary and a key, get item retums the value of the given

 Dictionary 1 Python questions: 1. Write a function called "get item".

Dictionary 1 Python questions: 1. Write a function called "get item". Given an dictionary and a key, "get item" retums the value of the given key. dictionary = { 'key': 'value'} output = get item (dictionary, 'key') print (output) # --> "value" PYTHON36 def get_item(dictionary, key): your code here pass 3 2. Write a function called "add item". Given an object anda key,"add item' adds a newkey on the given dictionary with a value of True. dictionary = {} add item (dictionary, 'my..property') print (my dict ['my.property']) # --> True PYTHON 1- def add_item(dictionary, key): 2 # your code here 3 pass 3. Write a function called "remove item". Given an object anda key, "remove item' removes the given key from the given dict. dictionary = {'name Sam', 'age:20} remove item(dictionary, name) print (dictionary) # --> {'age': 20) print (dictionary:get('name')) # --> None PYTHON3.6 1. def remove_item(dictionary, key): 2 HH your code here pass

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!