Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . Write a program that tallies the items one places inside their shopping cart. It should have the functions below: a . def main
Write a program that tallies the items one places inside their shopping cart. It should have the functions below:
a def mainmenu: 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.
Please note: Use the function name provided. The function should have no parameters and must return a string value.
b def cartmenu: 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.
Please note: Use the function name provided. The function should have no parameters and must return a numeric value.
c def main: 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.
Please note: Use the function name provided. The function should have no parameters and must return no value.
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.
Dont use global variables.
Currency values should be displayed to decimal places.
Your program should work as shown in the sample output scenarios below ie dont change the menu items or how the prompts are displayed
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