Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q3.2 Shopping Lists You are given two shopping lists (with items and quantity), one from your mom and one for yourself: - mom's list: banana
Q3.2 Shopping Lists You are given two shopping lists (with items and quantity), one from your mom and one for yourself: - mom's list: banana 5 , avacodo 8, eggs 12 , milk 2 , orange 6 - your list: Red Bull 12, potato chips 5, pineapple 3 , eggs 6 , avacodo 4 Please construct two dictionaries, one for each shopping list. ]: Q3.3 Merging the Shopping Lists You realize there are some overlapping items on the lists, so you decide to merge the two. Please write a function, merge_shop_list(a, b), that takes two dictionaries a and b as inputs, and merge them together. If there is a common item, you should add the quantities together. The function shall return the merged dictionary (or the shopping list). Show your result by printing the merged shopping list
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started