Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

GroceryList Create an interactive program the allows a user to build, edit and display their grocery list. The program should continuously prompt the user to

GroceryList
Create an interactive program the allows a user to build, edit and display their grocery list.
The program should continuously prompt the user to make one of the following choices:
Add an item
Remove an item chosen by the user
Make sure to check if the item is in the list first! Otherwise, you'll get a ValueError when you remove it!
Display all items in the list
Clear the list of items
Exit
Sample Output
Welcome to the Generic Grocery List Application!
Add an item
Remove an item
Display all items
Clear the list
Exit
Select an option: 1
Enter the item's name: Chips
Add an item
Remove an item
Display all items
Clear the list
Exit
Select an option: 1
Enter the item's name: Cadbury
Add an item
Remove an item
Display all items
Clear the list
Exit
Select an option: 1
Enter the item's name: Bacon
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Upgrading Oracle Databases Oracle Database New Features

Authors: Charles Kim, Gary Gordhamer, Sean Scott

1st Edition

B0BL12WFP6, 979-8359657501

More Books

Students also viewed these Databases questions