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
Perform the following tasks:
Create a dictionary named colordict containing keyvalue pairs 'red': 'green': and 'blue':
Read strings newkey and newvalue from input.
Add newkey and newvalue as a new keyvalue pair to colordict with newkey as the key and newvalue as the value.
Click here to show example
Ex: If the input is:
wheretoapply
wall
then the output is:
red:
green:
blue:
wheretoapply: wall
printfred: colordictred
printfgreen: colordictgreen
printfblue: colordictblue
printfnewkey: colordictnewkey
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
