Question: Code Example 1 2 - 1 1 . flowers = { red : rose, white: lily, yellow: buttercup } 2 . print (

Code Example 12-1
1.flowers ={"red": "rose", "white": "lily", "yellow": "buttercup"}
2.print(flowers)
3.flowers["blue"]= "carnation"
4.print(flowers)
5.print("This is a red flower:", flowers.get("red", "none"))
6.key = "white"
7.if key in flowers:
8.flower = flowers[key]
9.print("This is a", key, "flower:", flower)
10.key = "green"
11.if key in flowers:
12.flower = flowers[key]
13.del flowers[key]
14.print(flower +" was deleted")
15.else:
16.print("There is no", key, "flower")
Refer to Code Example 12-1: What would the print statement on line 9 display?

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!