Hi I writing a Python program to track and calculate the amount of money each of 8 customers spends on 12 grocery items. The code below works fine but The program also must congratulate the customer who spends the most money and offer that customer a $50 shopping spree.How can I do the last part (congratulate the customer who spends more money???)PLEASE SOMEBODY HELP ME!!!I HAVE TRIED SEVERAL TIMES BUT I GIVE UP
HERE IS THE CODE:
def receipt():
for i in range(8):
name = raw_input("Please enter a name: ")
print
item1 = raw_input("Input the name of the item: ")
price1 = input("Input the price of the item: $")
print
item2 = raw_input("Input the name of the item: ")
price2 = input("Input the price of the item: $")
print
item3 = raw_input("Input the name of the item: ")
price3 = input("Input the price of the item: $")
print
item4 = raw_input("Input the name of the item: ")
price4 = input("Input the price of the item: $")
print
item5 = raw_input("Input the name of the item: ")
price5 = input("Input the price of the item: $")
print
item6 = raw_input("Input the name of the item: ")
price6 = input("Input the price of the item: $")
print
item7 = raw_input("Input the name of the item: ")
price7 = input("Input the price of the item: $")
print
item8 = raw_input("Input the name of the item: ")
price8 = input("Input the price of the item: $")
print
item9 = raw_input("Input the name of the item: ")
price9 = input("Input the price of the item: $")
print
item10 = raw_input("Input the name of the item: ")
price10 = input("Input the price of the item: $")
print
item11 = raw_input("Input the name of the item: ")
price11 = input("Input the price of the item: $")
print
item12 = raw_input("Input the name of the item: ")
price12 = input("Input the price of the item: $")
print
Total = price1 + price2 + price3 + price4 + price5 + price6 + price7 + price8 + price9 + price10 + price11 + price12
Tax = Total * 0.07
GTotal = Total + Tax
print
print "%14s %14s" % ("Items", "Prices")
print
print "%14s %14s" % (item1, price1)
print "%14s %14s" % (item2, price2)
print "%14s %14s" % (item3, price3)
print "%14s %14s" % (item4, price4)
print "%14s %14s" % (item5, price5)
print "%14s %14s" % (item6, price6)
print "%14s %14s" % (item7, price7)
print "%14s %14s" % (item8, price8)
print "%14s %14s" % (item9, price9)
print "%14s %14s" % (item10, price10)
print "%14s %14s" % (item11, price11)
print "%14s %14s" % (item12, price12)
print
print "Subtotal: $", Total
print "Tax: $", Tax
print
print "Total: $", GTotal
print
print "Thank you for shopping with us, ",name
print
print
print
receipt()