Question: What is wrong with the following code that calculates the cost of an item with tax? 1 . tax = 0 . 0 6 2

What is wrong with the following code that calculates the cost of an item with tax?
1. tax =0.06
2. cost = float(input(How much does your item cost? ))
3. while(cost !=0):
4. new_cost = cost +(cost * tax)
5. print(Total cost is $ , new_cost)
6. print(Goodbye)
Multiple Choice
The calculation on line 4 is incorrect.
The tax amount is incorrect.
Line 6 should be indented.
The value of cost never changes so this will be an infinite loop.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!