Norah F.

asked • 10/22/14

I have to create a store receipt in Python 3.4.1. It has to allow unlimited input of items, show subtotal, tax, and total. Please help.

This is what I have and it doesn't work:
 
print("===============================================================================")
print(" Publix")
print("===============================================================================")


price=int( input("Enter amount for item: "))

while (True):
price=input()
if (price==-1):
break
else:
print("price $", price)






print("===============================================================================")


print("===============================================================================")


subtotal=(price)
print("Subtotal $", subtotal)

tax=int(subtotal * 0.070)
print("Tax $", tax)

total=int(subtotal + tax)
print("Total $", total)



## tax=int(subtotal+ 0.065)
## total=int(subtotal + tax)

print("=============================================================================")
print (" Publix Receipt")
print("=============================================================================")

print(" Thank you for your business!")

print
w.pack()

1 Expert Answer

By:

William M. answered • 12/15/19

Tutor
5 (51)

College professor specializing in Unreal Engine 4 and Pygame

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.