Question: Wire 3 functions in the starter code below such that: add_to_dict takes a dictionary, a key, a value and adds the key ve pair to

 Wire 3 functions in the starter code below such that: add_to_dict

Wire 3 functions in the starter code below such that: add_to_dict takes a dictionary, a key, a value and adds the key ve pair to the dictionary. If key is already in dictionary then it displays the error message: "Error Key already exists. Returns dictionary remove_from_dict takes a dictionary and key and removes the key from the dictionary, Returns dictionary. If no such key is found in the dictionary then it prints "No such key exists in the actionary. Hint Use try except ind keylakett keyk takes dictionary and key and prints value corresponding to the key from the dictionary: pex"Value: " value. It key is not found then prints Key not found Hint Use try except Example: Menu add a remover indika Key rich Value: 1 Morelly Menu add a remover, tinata Key Meza Value 2 More linn alireza, 21. trich

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!