title: How to make a python program loop back to a certain line
body: <p>I have the following code and I would like it to jump back to a line if a certain eventuality were to occur:</p>
  
  <pre><code>number_of_10ct = int(input("How many 10 Cent coins would you like to insert? "))
  while number_of_10ct &lt; 0:
      number_of_10ct = int(input("Please enter a positive number."))
  number_of_20ct = int(input("How many 20 Cent coins would you like to insert? "))
  while number_of_20ct &lt; 0:
      number_of_20ct = int(input("Please enter a positive number."))
  number_of_50ct = int(input("How many 50 Cent coins would you like to insert? "))
  while number_of_50ct &lt; 0:
      number_of_50ct = int(input("Please enter a positive number."))
  number_of_100ct = int(input("How many 1 Rand coins would you like to insert? "))
  while number_of_100ct &lt; 0:
      number_of_100ct = int(input("Please enter a positive number."))
  number_of_200ct = int(input("How many 2 Rand coins would you like to insert? "))
  while number_of_200ct &lt; 0:
      number_of_200ct = int(input("Please enter a positive number."))
  
  number_of_500ct = int(input("How many 5 Rand coins would you like to insert? "))
  while number_of_500ct &lt; 0:
      number_of_500ct = int(input("Please enter a positive number."))
  
  # Creating a variable to store the total amount of
  # money inserted into the vending machine.
  change = round(((number_of_10ct * 0.10) +
                  (number_of_20ct * 0.20) + 
                  (number_of_50ct * 0.50) + 
                  (number_of_100ct * 1.00) +
                  (number_of_200ct * 2.00) +
                  (number_of_500ct * 5.00)),
                 2)
  # Informing the user how much they have entered in total.
  print("\n")
  print ('You have a credit of' ,change, 'ZAR')
  
  while change &gt; 0:
      customer_choice = input(("What would you like to buy?"
                               "Type N when you are finished \n"))
      if (customer_choice == "Kleiner Brauner" or
          customer_choice == "kleiner brauner" and
          change &gt;= product_1_price):
          print ("You have chosen a", product_1,
                 "these cost", product_1_price, "each,")
          change = round((change - product_1_price),2)
          print ("You have this much money remaining: R", change)
      elif (customer_choice == "Kakao" or
            customer_choice == "kakao" and
            change &gt;= product_2_price):
          print ("You have chosen a", product_2,
                 "these cost", product_2_price, "each,")
          change = round((change - product_2_price),2)
          print ("You have this much money remaining: R", change)
      elif customer_choice == "N" or customer_choice == "n":
          break
      elif change &lt;= 0:
          print ("You have run out of money.")
          break
      else:
          print ("There has been an error or you may not have enough credit.")
  </code></pre>
  
  <p>What I would like to happen is: if <code>change = round((change - product_1_price),2)</code> would end up being negative, then I would like the program to return to the top (<code>number_of_10ct = int(input("How many 10 Cent coins would you like to insert? "))</code>) and allow the user to enter more "money".</p>
  
  <p>How can I do that?</p>