Question: PYTHON - Create a program (with block comments explaining each step) that takes a price of a product, adds the appropriate taxes, and presents a
PYTHON - Create a program (with block comments explaining each step) that takes a price of a product, adds the appropriate taxes, and presents a total. The prices of three items should be accepted, and program should output the cost of the tax for each item. For all items, there is an automatic 4% state sales tax applied to the price of the item purchased. If the purchase takes place in Austin, there is an additional 4% sales tax (8% sales tax total).
For each item, the customer should be asked to determine if the item being purchased is gasoline, tobacco, or alcohol. If the item is gasoline, an additional $1.60 in gasoline excise tax is to be added. If the item is tobacco, and additional $2.00 excise tax is to be added. And if the item is alcohol, and additional $5.00 excise tax is to be added.
You should maximize the use of declared constants in your program, and rely on defining functions for repeated work as much as possible. Once each item has been entered, the tax is calculated and a price for that item is shown. After all three items have been entered, a total purchase amount, including all taxes, should be shown.
Example of sample output:
SALES TAX CALCULATION PROGRAM You are in Austin so the sales tax rate is .08 The first product price: 1.00 There are no excise taxes on this product. The total price is The second product price:1.08
...and so on.
Again, after items have been priced, and taxed, the overall total amount spent should be printed.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
