Question: CHALLENGE ACTIVITY 3 . 5 . 1 : Dictionary basics. 5 4 7 1 4 8 . 3 1 5 4 6 4 2 .

CHALLENGE
ACTIVITY
3.5.1: Dictionary basics.
547148.3154642.qx329y7
Jump to level 1
Dictionary food_quantity_pairs contains four key-value pairs, each representing a food name and the quantity needed. Read a food name from input. Then, output the corresponding quantity from food_quantity_pairs. Finally, delete that pair from food_quantity_pairs.
Click here for example
Ex: If the input is pickles, then the output is:
46
Remaining pairs:
{'lemons': 63, 'cookies': 50, 'peppers': 48}
food_quantity_pairs ={? 'lemons': 63,?' cookies' :50, 'peppers' : 48, 'pickles' : 46
 CHALLENGE ACTIVITY 3.5.1: Dictionary basics. 547148.3154642.qx329y7 Jump to level 1 Dictionary

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 Databases Questions!