How to make a list of prices for a receipt? <p>I've been trying for a while to make my receipt to show all the prices I listed,using sum() to show subtotal, and make a dollar sign next to my prices. So far I have a lot of my receipt done, but can't figure this out. This is my code so far:</p> <pre><code>price = [] headphones = int(input("Enter price of Headphones: ") ) while(True): price = int(input("Enter price of Headphones: ")) if (price == -1): break apple= int(input("Enter price of Apple: ") ) while(True): price = int(input("Enter price of Apple: ")) if (price == -1): break pen = int(input("Enter price of Pen: ") ) while(True): price = int(input("Enter price of Pen: ")) if (price == -1): break mouse = int(input("Enter price of Mouse: ") ) while(True): price = int(input("Enter price of Mouse: ")) if (price == -1): break paper = int(input("Enter price of amount for Paper: ") ) while(True): price = int(input("Enter price of amount for Paper: ")) if (price == -1): break cookies = int(input("Enter price of Cookies: ") ) while(True): price = int(input("Enter price of Cookies: ")) if (price == -1): break bananas = int(input("Enter price of Bananas: ") ) while(True): price = int(input("Enter price of Bananas:")) if (price == -1): break bread = int(input("Enter price of Bread: ") ) while(True): price = int(input("Enter price of Bread: ")) if (price == -1): break subtotal = headphones + apple + pen + mouse + paper + cookies + bananas + bread tax = int(subtotal * 0.065) total = subtotal + tax a = headphones b = apple c = pen d = mouse e = paper f = cookies g = bananas h = bread w = subtotal y = w * .065 v = y+w print("Target Recipt".center(80, "-")) print("-".center(80, "-")) print("Headphones $: ".center(0, ), headphones) print("Apple $: ".center(0, ), apple) print("Pen $: ".center(0, ), pen) print("Mouse $: ".center(0, ), mouse) print("Paper $: ".center(0, ), paper) print("Cookies $: ".center(0, ), cookies) print("Bananas $: ".center(0, ), bananas) print("Bread $: ".center(0, ), bread) print("-".center(80, "-")) print() print() print("Subtotal".center(37, ), w) print("Tax".center(37, ), y) print() print("Total".center(37, ), v) print() print() print('Have a wonderful day!'.center(80, "-")) </code></pre> <p>I can't seem to figure out what what I'm doing wrong. I know that I'm supposed to use this:</p> <pre><code>prices = [] while(True): p = float(input("Enter a price" )) prices.append(p) for i in range(len(prices)): print(prices[i]) </code></pre>