Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
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

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

What is the basic difference between fission and fusion?

Answered: 1 week ago