title: How do I make this code loop into dictionaries and not continue looping in python?
body: <ul>
  <li>Write a program to calculate the cost of dinner
  
  <ul>
  <li>If the person is under 5, dinner is free</li>
  <li>If the person is under 10, dinner is $5</li>
  <li>If the person is under 18, dinner is $10</li>
  <li>If the person is over 65, the dinner is $12</li>
  <li>All other dinners pay $15</li>
  <li>Calculate 8% tax</li>
  <li>Display the total for each diner, the number of diners, the average cost per diner, and the cumulative total for all diners</li>
  <li>Program should loop until exit is entered, with each loop a new diner is added and the total overall numbers updated</li>
  </ul></li>
  </ul>
  
  <p>Is what I need to do. I'm not sure how to do it so the totals go into dictionaries and not loop.</p>
  
  <p>I've done a similar question, but now this one needs to have the amounts added all together and I'm not sure how. This is the code I've done for a previous similar question. The problem I seem to be currently having i it wont go into the dictionary and there for wont print it at the end. I also need it to keep looping until I type quit. </p>
  
  <pre><code>dinner = {}
  total ={}
  
  
  name = input("What's your name? ")
  age = input("What age is the person eating? ")
  age = int(age)
  amount = input("How many people that age? ")
  amount = int(amount)
  
  while True:
      if name == 'quit':
          print('Done')
          break
      elif age &lt; 5:
          price = 0 * amount
          tax = price * 0.08
          dinner[name] = name
          dinner[age] = age
          total[amount] = price + tax
          break
      elif age &lt; 10:
          price = 5 * amount
          tax = price * 0.08
          dinner[name] = name
          dinner[age] = age
          total[amount] = price + tax
          break
      elif age &lt; 18:
          price = 10 * amount
          tax = price * 0.08
          dinner[name] = name
          dinner[age] = age
          total[amount] = price + tax
          break
      elif age &gt; 65:
          price = 12 * amount
          tax = price * 0.08
          dinner[name] = name
          dinner[age] = age
          total[amount] = price + tax
          break
      else:
          price = 15 * amount
          tax = price * 0.08
          dinner[name] = name
          dinner[age] = age
          total[amount] = price + tax
          break
  print("Thank you for having dinner with us! \nYour total is {total}, for {dinner}.")
  </code></pre>