Question: Modify the code given above so that once the customer has selected No more doughnuts, the information for their order is added to a file
print"elcome to Dinel's International Doughnut Shoppe!") name -input( Please enter your name to begin:) flag = 1 doughnutsCount [0, 0, 0,01 doughnutsChocolate-dipped Maple Puff", "Strawberry Twizzler", "Vanilla Chai Strudel"Honey-drizzled Lemon Dutchie" doughnutsPrices 3.5, 2.25, 4.05, 1.99] while (flag 1)1 print("Please select a doughnut from the following menu:) print(. Chocolate-dipped Maple Puff (3.5 each)") print( 2. Strawberry Twizzler 2.25 each)) print3. Vanilla Chai Strudel ($4.05 each)") print( 4. Honey-drizzled Lemon Dutchie $1.99)" print( 5. No more doughnuts) op int(input(>) if (op 0 and op totalPricedoughnutsPrices(doughnutscount(i print (nanehere is your receipti") print for in range(o, 4) if doughnutsCount[i - 0 print (doughnutscount[i].-str-() " + + doughnuts[i)) print print( "Total Coat $" + totalprice.-str-()} print"Thank you, have a nice day!" print"elcome to Dinel's International Doughnut Shoppe!") name -input( Please enter your name to begin:) flag = 1 doughnutsCount [0, 0, 0,01 doughnutsChocolate-dipped Maple Puff", "Strawberry Twizzler", "Vanilla Chai Strudel"Honey-drizzled Lemon Dutchie" doughnutsPrices 3.5, 2.25, 4.05, 1.99] while (flag 1)1 print("Please select a doughnut from the following menu:) print(. Chocolate-dipped Maple Puff (3.5 each)") print( 2. Strawberry Twizzler 2.25 each)) print3. Vanilla Chai Strudel ($4.05 each)") print( 4. Honey-drizzled Lemon Dutchie $1.99)" print( 5. No more doughnuts) op int(input(>) if (op 0 and op totalPricedoughnutsPrices(doughnutscount(i print (nanehere is your receipti") print for in range(o, 4) if doughnutsCount[i - 0 print (doughnutscount[i].-str-() " + + doughnuts[i)) print print( "Total Coat $" + totalprice.-str-()} print"Thank you, have a nice day
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
