Answer to Question #332474 in Algorithms for Prince

Question #332474

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%


1
Expert's answer
2022-04-23T03:21:51-0400
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)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS