Question: python: Jump to level 1 Perform the following tasks: Create a dictionary named color _ dict containing key - value pairs 'red': 2 2 0

python:
Jump to level 1
Perform the following tasks:
Create a dictionary named color_dict containing key-value pairs 'red': 220, 'green': 220, and 'blue': 220.
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.
Click here to show example
Ex: If the input is:
where_to_apply
wall
then the output is:
red: 220
green: 220
blue: 220
where_to_apply: wall
1
2
3 print(f'red: {color_dict["red"]}')
4 print(f'green: {color_dict["green"]}')
5 print(f'blue: {color_dict["blue"]}')
6 print(f'{new_key}: {color_dict[new_key]}')
python: Jump to level 1 Perform the following

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 Programming Questions!