141k views
3 votes
Answer must be submitted in a python file (.py at the end of the file) or as python code snippet

Pretend you need to added 10% taxes to your total from a purchase


Write a program that answers this questions (What is your total?) using the input function

Take the value entered and add 10% to the total

Display the total

User Supakeen
by
4.4k points

1 Answer

3 votes

Answer:

purchase_cost = float(input("What is your purchase cost? "))

tax_rate = 10/100 #(10% = 10/100)

tax = purchase_cost * tax_rate

total_cost = purchase_cost + tax

print("Total Cost = ", total_cost)

Step-by-step explanation:

User Davidgyoung
by
5.2k points