For this question, you will write a (very) simple shopping list application. Your program will allow...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 program's 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. What to Hand In Hand in your solution in a file called a5q1v1.py. The version number (v1) portion of the file names must be changed to v2, v3 etc. each time you resub- mit your assignment. Remember to include all your solution files each time you submit/resubmit your assignment. Evaluation • 2 marks for correct while loops • 1 mark for console input • 1 mark for creating a list type variable • 1 mark for printing shopping list • 1 mark for correctly using method append() . • 1 mark for correctly using method remove() 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 program's 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. What to Hand In Hand in your solution in a file called a5q1v1.py. The version number (v1) portion of the file names must be changed to v2, v3 etc. each time you resub- mit your assignment. Remember to include all your solution files each time you submit/resubmit your assignment. Evaluation • 2 marks for correct while loops • 1 mark for console input • 1 mark for creating a list type variable • 1 mark for printing shopping list • 1 mark for correctly using method append() . • 1 mark for correctly using method remove()
Expert Answer:
Answer rating: 100% (QA)
Python program for a simple shopping list application based on your requirements python Initialize a... View the full answer
Related Book For
Principles Of Information Security
ISBN: 9780357506431
7th Edition
Authors: Michael E. Whitman, Herbert J. Mattord
Posted Date:
Students also viewed these programming questions
-
On January 1, 2024, Blossom Software Company's general ledger contained these liability accounts Accounts payable $41,000 Unearned revenue-loyalty program 3,900 CPP payable 1330 payable 700 HST...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Googles ease of use and superior search results have propelled the search engine to its num- ber one status, ousting the early dominance of competitors such as WebCrawler and Infos- eek. Even later...
-
On January 5, Jones Ventures Inc. purchased 40% of the outstanding stock of Pilots Manufacturing Corp. The purchase was 20,000 shares at $10 per share. Jones received dividends from Pilots in the...
-
Calculate in atomic mass units the mass of (a) A Li8 s atom whose nucleus has the binding energy 4i.3 MeV; (b) A C10 nucleus whose binding energy per nucleon is equal to 6.04 MeV.
-
Name any four interactions in the tertiary structure of proteins.
-
Consider a $2^{2}$ factorial experiment with factors A and B. Show that $I N T(A, B)=I N T(B, A)$. That is, the interaction is symmetric in $\mathrm{B}$ and A.
-
Operating budgets: labor hiring plan Strathfield Motel is planning its operations for the upcoming tourist season. The motel has 60 units. The following table presents the average number of daily...
-
Maslow's hierarchy of needs provide a useful framework for understanding how and why local products and brands can be extended beyond home-country borders. How can Maslow's needs hierarchy be used in...
-
Using Rhodes Corporation's financial statements (shown below), answer the following questions. a. What is the net operating profit after taxes (NOPAT) for 2012? b. What are the amounts of net...
-
Task Title: Constraint Satisfaction Problems Purpose of the assignment: Students should prepare a report to discuss the main topics related to the Constraint Satisfaction Problems. Assignment...
-
What is the output of the following application? A. 5 bent! B. 5.0 bent! C. The code does not compile because Bend is not a functional interface. D. The code does not compile because of the apply( )...
-
Which of the following is not a reason to use encapsulation when designing a class? (Choose two.) A. Improve security. B. Increase concurrency and improve performance. C. Maintain class data...
-
What is the output of the Watch program? A. smart watch,watch B. watch,smart watch C. watch,watch D. The code does not compile. E. An exception is printed at runtime. F. None of the above. 1: class...
-
Given the following structure, which snippets of code return true? (Choose three.) A. new Coral() instanceof Friendly B. null instanceof Object C. new Coral() instanceof Object D. new Fish()...
-
Which is the first declaration to not compile? A. The CanBurrow interface does not compile. B. The HasHardShell interface does not compile. C. The Tortoise interface does not compile. D. The...
-
You are the Human Resource Manager, and have been tasked with developing the Management proposals for the upcoming negotiations with the Union. The Management team is expected to negotiate an...
-
Comptech Ltd is a manufacturer of optical equipment. In September 2019, Ed Thompson the Chief Research Officer, attended a conference in Switzerland that focused on optical developments for the 21st...
-
Which of the following information security roles is accountable for the day-to-day operation of the information security program? a. Security Analyst b. CISO c. CSO d. Security Manager
-
Identify the fact that information is authentic when it is given to a user in the same state that it was created, placed, stored, or transferred. Evaluate the example of e-mail spoofing and how...
-
Which type of firewall filtering allows the firewall to react to an emergent event and update or create rules to deal with the event? a. Static b. Stable c. Unstable d. Dynamic
-
Jenny and Donny were married in 2015 and have two children, Chase and Ruby. Donny filed for divorce in 2017 and the divorce was finalized in 2018. Donny has custody of the children and received the...
-
Jerome received a home as a gift from his uncle on March 15, 2023. His uncle paid \($250,000\) and its fair market value on March 15 is \($400,000.\) Jeromes uncle paid gift tax of \($10,000.\) What...
-
Myrtle had been sick for quite some time and she passed away in July. Her will indicated her beneficiaries are to receive the following: Miriam, her daughter, will receive Myrtles home worth...
Study smarter with the SolutionInn App