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 20:00
An excel which cell contains =b2 is copied to row below, the same column. what will be the new cell's content
Answers: 2
question
Computers and Technology, 22.06.2019 21:40
Develop a function to create a document in the mongodb database “city” in the collection “inspections.” be sure it can handle error conditions gracefully. a. input -> argument to function will be set of key/value pairs in the data type acceptable to the mongodb driver insert api call b. return -> true if successful insert else false (require a screenshot)
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Best laptops for college [$100-$500 range]?
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
3. what do the terms multipotentialite, polymath, or scanner mean?
Answers: 2
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
question
Mathematics, 12.07.2019 07:00
question
Mathematics, 12.07.2019 07:00
Questions on the website: 13722361