Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Walmart ShopperWalmart is currently hiring a record number of new shoppers to fill orders for online grocery purchase. A. To help the new shoppers,

   

Walmart ShopperWalmart is currently hiring a record number of new shoppers to fill orders for online grocery purchase. A. To help the new shoppers, write a function makeDict that allows a manager to create a dictionary D with the aisle as the key and a list of 3 most popular grocery items in it. Your function should work from the list of aisles to prompt for three popular items in the aisle, and build the dictionary, and return the dictionary. Example: aisles=["frozen" "bakery","breakfast"] >>> makeDict(aisles) Enter a popular item in aisle frozen: ice cubes Enter a popular item in aisle frozen: ice cream Enter a popular item in aisle frozen: popsicles Enter a popular item in aisle bakery: bread Enter a popular item in aisle bakery: cake Enter a popular item in aisle bakery: rolls Enter a popular item in aisle breakfast: oatmeal Enter a popular item in aisle breakfast: cereal Enter a popular item in aisle breakfast: granola {"frozen": ["ice cubes", "ice cream", "popsicles"], "bakery": ["bread", "cake", "rolls"], "breakfast": ["oatmeal", "cereal", "granola"]} B. Next write a function findit for the new employees that will search the dictionary D for a grocery item they are looking for and return the aisle where they can find it. C. Next write a function autoshop that will use the dictionary D and take a list of shopping items and print to the screen the item name and the aisle in which it can be found. This will help the new employees quickly find the items in the store. D. Write a function get shoplist to obtain the list of items from a customer. It should prompt for a new item until the user types the string Done. It should then return the list.

Step by Step Solution

3.58 Rating (166 Votes )

There are 3 Steps involved in it

Step: 1

part A def makeDictaisles d for i in aisles for j in range3 datainputEnter a popular item in aisle f... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elementary Statistics

Authors: Neil A. Weiss

8th Edition

321691237, 978-0321691231

More Books

Students also viewed these Programming questions

Question

Differentiate a proposed regulation and a temporary regulation.

Answered: 1 week ago

Question

What are controls?

Answered: 1 week ago