Question: in Python please Vrite a program that tallies the items one places inside their shopping cart. It should have functions below: a. def main_menu(): This

in Python please  in Python please Vrite a program that tallies the items one
places inside their shopping cart. It should have functions below: a. def
main_menu(): This function should display the main menu and return the response

Vrite a program that tallies the items one places inside their shopping cart. It should have functions below: a. def main_menu(): This function should display the main menu and return the response selected by the user to the main function. It should contain logic to account for invalid response input. b. def cart_menu(): This function should display the shopping cart items and return the response selected by the user to the main function. It should contain logic to account for invalid response input. c. def main0: This function is responsible for keeping track of the item count and the total cost of all the items added to the cart and displaying the final output. d. You are free to use more functions than those listed. Use the sample output to guide you on the program logic. Please note: - Strip your string input and make sure you are accounting for upper- and lowercase input. - Don't use global variables. - Currency values should be displayed to 2 decimal places. - Your program should ork as shown in the sample output. SAMPLE OUTPUT _.CART MENU ..MAIN MENU- 1: Cookie - $1.50 s: Shop 2: Sandwich - \$4.00 x : Exit 3: Water - $1.00 Option: q Item: 2 Invalid (s/x): s Added sandwich ...CART MENU-.. ..MAIN MENU-... 1. Cookie $1.50 2: Sandwich $4.00 3: Water - $1.00 s: Shop Item: 0 x : Exit Invalid (1-3): 1 Option: S Added cookie - CART MENU -.. - .MAIN MENU-.. 1: Cookie - $1.50 s: Shop 2. Sandwich - $4.00 x : Exit 3: Water $1.00 Option: S Item: 3 \( \begin{array}{ll}\text { 1: CART MENU-_ } & \text { s: Shop } \\ \text { 2: Sandwich - } 54.00 & \text { x: Exit } \\ \text { 3. Warer - S1.00 } & \text { Option: } x\end{array} \) 3: Water - $1.00 Invalid (1-3): 1 1: Cookie - $1.50 Added cookie 2: Sandwich - $4.00 ...MAIN MENU ... 3: Water - $1.00 s: Shop Item: 3 x : Exit Added water Option: S _.MAIN MENU-.. ...CART MENU ... s: Shop 1: Cookie - $1.50 x: Exit 2: Sandwich - $4.00 Option: x 3: Water - $1.00 Item: 1 (2) - Cookie =$3.00 Added cookie (1) Sandwich =$00 -MAIN MENU-.. (1) - Water - $1.00 s: Shop x : Exit GRAND TOTAL =$8.00 Option: s

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!