Question
Purpose: To practice your ability to create and manipulate lists. Degree of Difficulty: Easy For this question, you will write a (very) simple shopping list
Purpose: To practice your ability to create and manipulate lists. Degree of Difficulty: Easy For this question, you will write a (very) simple shopping list application. Your program will allow a user to create a list of groceries they need to buy, and allow them to remove items from their list as they add them to their grocery cart. The first part of your program should ask the user to create a shopping list. It should repeatedly show a prompt to the user asking if they want to add something to their list. Each time they say yes, the program should ask the user to enter the item and it should be added to a list variable that holds the shopping list, and then ask again. When they say no, the program should continue to the second part. Get this part of the program working before going any further. Do not move on to the second part of the program until you know that the first part works. The second part of the program will display the shopping list. A prompt will then ask the user to type the name of the item they would like to delete from their list. Once they enter an item, that item will be removed from the shopping list. The program will then continue to print the list and ask for an item to be removed. Once there are no more items in the list, the program will terminate. A typical run of our program might look like this: Sample Run Here is an example of how your programs console output might look. Green text was entered by the user. Welcome to Super Shopper! What would you like to add to your shopping list?: milk Item milk added. Would you like to add something to your list (y/n)?: y Item name: eggs Item eggs added. Would you like to add something to your list (y/n)?: n Items in your list: [milk , eggs ] What item would you like to delete ?: eggs Items in your list: [milk ] What item would you like to delete ?: milk Shopping Complete! Goodbye.
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