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, 22.06.2019 10:30
Auniversity wants to install a client-server network. which feature do you think is important for them as they set up the network? sending email blocking multiple people to use the same file low security low set up cost limited access to files
Answers: 1
question
Computers and Technology, 22.06.2019 21:10
Dameas communication challenge is due to which factor
Answers: 2
question
Computers and Technology, 23.06.2019 01:00
Let r be a robotic arm with a fixed base and seven links. the last joint of r is a prismatic joint, the other ones are revolute joints. give a set of parameters that determines a placement of r. what is the dimension of the configuration space resulting from your choice of parameters?
Answers: 3
question
Computers and Technology, 23.06.2019 19:00
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
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
Questions on the website: 13722360