Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use PYTHON CODE Starting with just an empty dictionary, write a function that creates a grocery list that does the following: - Add An Item
Use "PYTHON CODE"
Starting with just an empty dictionary, write a function that creates a grocery list that does the following: - Add An Item (takes three inputs from the user: the name of the item, price for one item, and the quantity, then add it to the existing list) - Remove An Item (takes a string input from the user and removes all instances from the list) - Print Entire List (prints out all the contents of the list) - Calculate Cost (prints out the total cost of the items in the list) - Exit (exit the program) be removed (in other words "Eggs" and "eggs" still refer to the same item). Printing the entire list this time would now include the price and quantity of the items. The Calculate Cost command should also print the entire list first before showing the total cost of the items. The program should continue running until the user decides the terminate it by doing the Exit command. Otherwise, it should catch all errors whenever possible. The output of your code should look like this
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started