Question: Exercise 3: Identify & Fix the Error Analyze the code to your left. It contains three errors. Identify this type of error and fix the



Exercise 3: Identify \& Fix the Error Analyze the code to your left. It contains three errors. Identify this type of error and fix the code. When running correctly, the program will determine the price for each doughnut based on the quantity they want to buy. Once a price has been deteremined the program will calculate the subtotal, tax and total for the order. If the user enters 6 for the number of doughnuts, the program should print: Subtotal: $9.0 Tax: $0.54 Total: $9.54 Exercise 3: Identify \& Fix the Error What type of error is this? In the space provided enter syntax, run-time or logic. To test your code prior to grading, click on the Code Visualizer button. When you have fixed the code click on the Check It! button. Codio will run your program twice. The first test will use 6 for the number of doughnuts. The second test will use another type of input. Check 1 failed Output: Enter the number of doughnuts: Subtotal: $9.0 Tax: $0.54 Total: \$ 8.46 Expected: Enter the number of doughnuts: Subtotal: $9.0 Tax: $0.54 Total: $9.54 Feedback: Make sure you have identified all 3 errors. Check 2 failed Output: Enter the number of doughnuts: Subtotal: $4.5 Tax: $0.27 Total: $4.23 Expected: Enter the number of doughnuts: Subtotal: $4.5 Tax: $8.27 Total: \$4.77 Exercise 3: Identify \& Fix the Error thoe of whor and fix the coue Whenruming corroctly the proparm they waint to buy Once a proct has been ditereminind the program - Watcoen to the Codio Ternins 21 * Your cods Bos denaila isr natchicsdet-chariotineest. codio. lo codfoemarchebdet echar fotifiventi-feorkepsecs
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
