Answered step by step
Verified Expert Solution
Question
1 Approved Answer
This is the code This is the problem. categories-[ Books,Electroni.ca,Clothing] noltems [o,0,0 cost-[O,0,0 emainmenu(): while True: print (Inin 1 -Books n 2 Electronics In 3-Clothingin
This is the code
categories-[ "Books","Electroni.ca","Clothing"] noltems [o,0,0 cost-[O,0,0 emainmenu(): while True: print ("Inin 1 -Books n 2 Electronics In 3-Clothingin 4 - Checkoutn") print ("In Select one of the categories or checkout (1-4):"end- op-int (inputO) if (op>-l and op 0): print ("InInSummary of shopping cartiinin) print(" %-20s %-20s %-20s "$("category", "Number tor i in range (len (noItema)): of items ", "cost of items")) print (" %-25s %-20d t.If "$(categories [1],noltens [1],cost [1])) if (noItems(11!-0) print ("Inin 1-25s 1-20d .1f Inin"("Total",sum (noItems),sum(cost))) else: print("nCart is empty!) print ("Inl. return to category menu") print ("2. check out") print("In Select (-2) end subop int (input ) if (aubop1) mainmenu () print ("InThanks tor shopping with us categories-[ "Books","Electroni.ca","Clothing"] noltems [o,0,0 cost-[O,0,0 emainmenu(): while True: print ("Inin 1 -Books n 2 Electronics In 3-Clothingin 4 - Checkoutn") print ("In Select one of the categories or checkout (1-4):"end- op-int (inputO) if (op>-l and op 0): print ("InInSummary of shopping cartiinin) print(" %-20s %-20s %-20s "$("category", "Number tor i in range (len (noItema)): of items ", "cost of items")) print (" %-25s %-20d t.If "$(categories [1],noltens [1],cost [1])) if (noItems(11!-0) print ("Inin 1-25s 1-20d .1f Inin"("Total",sum (noItems),sum(cost))) else: print("nCart is empty!) print ("Inl. return to category menu") print ("2. check out") print("In Select (-2) end subop int (input ) if (aubop1) mainmenu () print ("InThanks tor shopping with us This is the problem.
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