subject

Create a two functions: first called grocery_cost(food), where food can be one item or a list of items from the stock and price dictionaries, the second is called stock_check(stock_list) where a store manager can check if stock numbers are at a minimum value. grocery_cost: loops through the argument food, notes the price, checks the stock, calculates and prints the total cost and changes the stock number. you will need to use a for statement to loop through the items in food and an if statement to check and update the stock (substract one from the stock for each item in the stock).stock_check: loops through each item in the stock dictionary and uses an if-statement to print a statement if stock is less than 5.given: stock_key={'tomato soup': 20,'cheese': 10,'milk': 25,'oreos': 100,'red bull': 0,'apples': 17,'oranges': 4}price_key={'tomato soup': 1.85,'cheese': 3.99,'milk': 4,'oreos': 7.49,'red bull': 0.99,'apples': 0.59,'oranges': 1.29}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:40
Match each feature of e-publishing as an advantage, a disadvantage, a threat, or an opportunity. (choices) increased collaboration digitalized out-of-print versions monopoly over digital formats requirement for a specialized digital device pairs advantage of e-publishing disadvantage of e- opportunity for e- threat to e-
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
You need a quick answer from a coworker. the most effective way to reach your coworker is through a. cloud server b. instant message c. teleconference d. telepresence
Answers: 1
question
Computers and Technology, 23.06.2019 21:20
In microsoft word, when you highlight existing text you want to replace, you're in              a.  advanced mode.    b.  automatic mode.    c.  basic mode.    d.  typeover mode
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
You know the right answer?
Create a two functions: first called grocery_cost(food), where food can be one item or a list of it...
Questions
Questions on the website: 13722361