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,'ore os':100,'red bull':0,'apples':17,'oranges':4}pri ce_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, 23.06.2019 23:30
Perform an online search about the booting process of a computer and list all the steps
Answers: 2
question
Computers and Technology, 24.06.2019 14:30
Ahousehold consists of a married couple and their twin five-year old daughters. the couples children had no income and lived with their parents all of last year. how many exemptions can the couple claim on last years tax return or they file with the “ married filing jointly “ status? a. 4 b. 5 c. 3 d. 2
Answers: 1
question
Computers and Technology, 24.06.2019 17:00
The length of time that a slide appears before automatically advancing to the next slide can be set in the timing group under the transitions tab. transition to this slide group under the transitions tab. timing group in the master slide view. transition to this slide group in the master slide view.
Answers: 1
question
Computers and Technology, 25.06.2019 06:00
Me on this app how do you take a picture of your work
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 ite...
Questions
question
Mathematics, 16.10.2020 16:01
question
Mathematics, 16.10.2020 16:01
question
Mathematics, 16.10.2020 16:01
question
English, 16.10.2020 16:01
question
Mathematics, 16.10.2020 16:01
question
Mathematics, 16.10.2020 16:01
Questions on the website: 13722360