Question: Which statement adds 'pears' to the following dictionary? prices = { ' apples ' : 1 . 9 9 , 'oranges': 1 . 4 9

Which statement adds 'pears' to the following dictionary?
prices ={'apples': 1.99, 'oranges': 1.49, 'kiwi': 0.79}
2)
Executing the following statements produces a KeyError:
prices ={'apples': 1.99, 'oranges': 1.49, 'kiwi': 0.79} del prices['limes']
3)
Executing the following statements adds a new entry to the dictionary:
prices ={'apples': 1.99, 'oranges': 1.49, 'kiwi': 0.79} prices['oranges']=1.29

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!