title: Python Sentinel controlled loop
body: <p>I was wondering if anyone could help point me in the right direction! I'm a beginner and I'm totally lost. I'm trying to make a Sentinel controlled loop that asks the user to "enter the amount of check" and then ask "how many patrons for this check". After it asks the user then enters it until they type -1.  </p>
  
  <p>once user is done inputting it is suppose to calculate the total,tip,tax of each check with an 18% tip for anything under 8 patrons and 20%tip for anything over 9 and a tax rate of 8%.</p>
  
  <p>and then it should add up the Grand totals.
      ex: check 1 = 100$ 
      check 2 = 300 
      check 3 = 20 
      Total checks = $420
  I'm not asking for someone to do it for me but just if you could point me in the right direction, this is all i have so far and im stuck. </p>
  
  <p>As of right now the code is horrible and doesn't really work.
  I completed it in Raptor and it worked perfectly I just don't know how to convert it to python </p>
  
  <pre><code>sum1 = 0
  sum2 = 0
  sum3 = 0
  sum4 = 0
  sum5 = 0
  check = 0
  print ("Enter -1 when you are done")
  
  
  
  check = int(input('Enter the amount of the check:'))
  while check !=(-1):
      patron = int(input('Enter the amount of patrons for this check.'))
      check = int(input('Enter the amount of the check:'))
  
  tip = 0
  tax = 0
  
  
  if patron &lt;= 8:
      tip = (check * .18)
  elif patron &gt;= 9:
      tip = (check * .20)
  
  total = check + tax + tip
  sum1 = sum1 + check
  sum2 = sum2 + tip
  sum3 = sum3 + patron
  sum4 = sum4 + tax
  sum5 = sum5 + total
  
  print ("Grand totals:")
  print ("Total input check = $" + str(sum1))
  print ("Total number of patrons = " + str(sum3))
  print ("Total Tip = $" +str(sum2))
  print ("Total Tax = $" +str(sum4))
  print ("Total Bill = $" +str(sum5))
  </code></pre>