title: "Simple" Grocery List
body: <p>I have an assignment to create a 'simple' grocery list in python in which the user is asked for names of groceries and their price, then what they are actually buying and the quantity, and then display the total price. The groceries must be put into a dictionary when initially asked, and the second part where the user is asked what they are buying and a price must be in a second loop, rather than just simply asking 'how much are you buying' in the first loop. Here is what I have so far: </p>
  
  <pre><code>item = {}
  choice = 0
  
  while True:
      x = input('enter item: ')
      if x =='done':
          break
      y = float(input('enter price: '))
  
      item[x] = (y)
  
  while True:
  
      x=input('enter item: ')
  </code></pre>
  
  <p>for the second 'while true' statement, I tried this but it didn't work:</p>
  
  <pre><code>while True:
  
      x=input('enter item: ')
  
      if x =='done':
          break
      z=input("enter amount you want to purchase: ")
      a=z*y
  </code></pre>
  
  <p>It came back with a</p>
  
  <pre><code>type error, can't multiply sequence by non-int of type 'float'
  </code></pre>
  
  <p>any help would be appreciated because i get to skip an early morning class on Friday if i submit this beforehand. Thanks!</p>