Question: Perform the following tasks: Create a dictionary named color _ dict containing key - value pairs 'red': 2 1 8 , 'green': 1 6 5

Perform the following tasks:
Create a dictionary named color_dict containing key-value pairs 'red': 218, 'green': 165, and 'blue': 32.
Read strings new_key and new_value from input.
Add new_key and new_value as a new key-value pair to color_dict with new_key as the key and new_value as the value.

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!