A customer in a store is purchasing five items. Design a program that asks for the price of each item, and then displays the subtotal of the sale, the amount of sales tax, and the total. Assume sales tax is 6%
cost = 0
for i in range(5):
price = float(input('Enter price: '))
cost += price
print('Subtotal of the sale:', round((cost * 0.94), 2))
print('Tax:', round((cost * 0.06), 2))
print('Total:', cost)
Comments
Leave a comment