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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 21:30, Cheflulu5727
Write a function named printfloatrepresentation(float number) that will print the floating point representation of a number using the format given below. (sign bit) exponent in binary (assumed bit).significandfor example if the number passed an argument is 71 yourprogram should print (0) 10000101 (1).00011100000000000000000similarl y if the number passed to the function as argument is -71 the program should print (1) 10000101 (1).00011100000000000000000
Answers: 3
image
Computers and Technology, 23.06.2019 22:20, kandi2565
What is a programming method that provides for interactive modules to a website?
Answers: 1
image
Computers and Technology, 23.06.2019 22:30, meijorjay94p2u2zy
Apart from confidential information, what other information does nda to outline? ndas not only outline confidential information, but they also enable you to outline .
Answers: 1
image
Computers and Technology, 24.06.2019 13:30, iicekingmann
In the rgb model, which color is formed by combining the constituent colors? a) black b) brown c) yellow d) white e) blue
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 in other subjects:

Konu
Spanish, 15.07.2020 20:01