1 2 *** Your code goes here '''|| 3 4 print(f'red: {color_dict["red"]}') 5 print(f'green: {color_dict["green"]}') 6 print (f'blue: {color_dict["blue"]}") 7 print(f' {key_read}: {color_dict[key_read]}')

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter8: Arrays
Section: Chapter Questions
Problem 4MQ3
icon
Related questions
Question

Perform the following tasks:

  • Create a dictionary named color_dict containing key-value pairs 'red': 222, 'green': 184, and 'blue': 135.
  • Read strings key_read and value_read from input.
  • Add key_read and value_read as a new key-value pair to color_dict with key_read as the key and value_read as the value.
1
2 *** Your code goes here '''||
3
4 print(f'red: {color_dict["red"]}')
5 print(f'green: {color_dict["green"]}')
6 print (f'blue: {color_dict["blue"]}")
7 print(f' {key_read}: {color_dict[key_read]}')
Transcribed Image Text:1 2 *** Your code goes here '''|| 3 4 print(f'red: {color_dict["red"]}') 5 print(f'green: {color_dict["green"]}') 6 print (f'blue: {color_dict["blue"]}") 7 print(f' {key_read}: {color_dict[key_read]}')
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning