Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
image text in transcribed
image text in transcribed
This is the problem.
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 12c SQL

Authors: Joan Casteel

3rd edition

1305251032, 978-1305251038

More Books

Students also viewed these Databases questions

Question

Explain key approaches to implementing LMD

Answered: 1 week ago