Earn Higher Grades With Instant Assignment Help.Ask Question!

Python Programming
(5/5)

take orders for multiple shopping carts for each category, display a submenu of specific items after that category is selected

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS
  1. take orders for multiple shopping carts

…for each category, display a submenu of specific items after that category is selected

  1. the submenu includes a specific named item and its price
  2. collect and validate the item selection number, flag an invalid selection
  3. keep a list of each category’s specific item cost – use a list (or tuple or dictionary) to translate the selected item’s menu number into a price (see below for the named items and prices)
  4. accumulate the number of category items and category costs selected – the quantity of each selection is one, but repeated selections may be made by selecting them again from the menu 6. redisplay the item menu until ‘x’ is selected, at which point the category menu is selected
  5. redisplay the main category menu and continue processing until ‘c’ (checkout) is selected from the category menu
  6. print the checkout summary– the format should display dollars and cents using the print formatting statements shown in class
  7. ask whether more carts are to be processed
  8. continue until no more carts are desired by the user
  9. print a session summary that includes total number of carts, items, and cost of all carts processed

 

The category menu will display one of four choices :

The following submenu will be displayed for the Books selection when category ‘1’ is selected:

 

Extra clarification:

The user enters a selection and the program validates it is one of the above (1 through 3 or ‘x’). If 1, 2, or 3, the program adds the selected item and price to the totals for that category. Selecting an item adds one item to the cart (which should be implemented as a list) and one price, so your program represents the cart as a list of lists. The sublists are [, price], e.g., [“Grant”, 24.95]. If two of the same items are desired they must be selected twice and recorded twice in the cart. If ‘x’ is selected, the category menu is redisplayed. Otherwise the same item submenu is redisplayed.

The menu is displayed for more selections until the user selects ‘c’ (checkout). When checkout is selected the program iterates through the cart (list) and prints a report showing each item in the cart, its price, the total number of items in the cart, and the total price of all items in the cart. The item description, count, and price formatting be of good quality: no ragged columns and dollars and cents displayed using two digits to the right of the decimal point.

The program then asks if there are more carts to process and, if yes, repeats the above. If not, the totals for all carts and all item counts and costs is printed.

Attachments:
(5/5)

Expert's Answer

10 Times Downloaded

Related Questions

CSI 1420 Introduction to C Programming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two majorconstructs of the C programming language – Fu

The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

10 Times Downloads

Ask This Assignment To Be Done By Our ExpertsGet A+ Grade Solution Guaranteed

expert
joyComputer science
(4/5)
12 Answers Hire Me
expert
Robert DLaw
(4.8/5)
966 Answers Hire Me
expert
Dr Samuel BarberaStatistics
(5/5)
997 Answers Hire Me
expert
Tutor For YouEconomics
(5/5)
863 Answers Hire Me