Question: Given the following code, what will display after the code executes? pets = { dog: {type: poodle, color: white}, cat: {type: Siamese, color: black and

Given the following code, what will display after the code executes?

pets = {

"dog": {"type": "poodle", "color": "white"},

"cat": {"type": "Siamese", "color": "black and white"},

"bird": {"type": "parrot", "color": "green"}

}

pet = pets["dog"]

pet = pets["bird"]

print(pet["color"], pet["type"])

a.

poodle white

b.

white poodle

c.

green parrot

d.

parrot green

ANS:

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!