(Solved) : Use Grocerypy File Canvas Start Program Problem Contains Two Dictionaries Stock Price Crea Q42758349 . . .

Use the grocery.py file on Canvas to start your program for thisproblem. It contains two dictionaries of stock and price. Create afunction called “grocery_cost” that has one input (dictionary withfood items and quantities). The function will have two outputs ofthe total cost of a shopping list and the dictionary with fooditems and quantities sold. The function should check each item inthe input dictionary and determine if the item is something that islisted in the stock dictionary. If it is not stocked the functionshould display a message to the user that it is not an item that isstocked. If it is stocked it should check to see if the quantityrequested is available in the stock dictionary. If the requestedquantity is greater than the available quantity, it should ask ifthe user if they would like the quantity that is available listingthe stock dictionary. The “grocery_cost” function also needs toupdate the number of items available in the stock dictionary afterthe quantity of each item is finalized. After determining the itemsthat are available in stock, the function should calculate anddisplay the subtotal of the cost, tax of 5.5% and the total cost(subtotal plus tax) of all items. The displayed values should allline up at the decimal point. The total cost and final grocery listare returned from the function

Expert Answer

Answer to Use the grocery.py file on Canvas to start your program for this problem. It contains two dictionaries of stock and pric…

Leave a Comment


We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?