title: python "break" error: break outside loop
body: <p>When I was developing my first code I faced a problem which with the <code>break</code> command which I tried to use to restart the program if there's an error.</p>
  
  <p>Take a look on the code maybe you would understand better.</p>
  
  <pre><code>  Name = str(input("Please enter Your Name:"))
    Age = input("Please enter your age: ")
         if Age != int():
              print ("Error! Check the age")
              break
       elif Age == int():
            continue
    Height = input("Please enter your height: ")
      if Height != int():
           print ("Error! Check the Height")
               break
     elif Height == int():
          continue
  
   if Age == int() and Age &gt;= 18 and Height == int() and Height &gt;= 148:
    print("You're able to drive a car " + (Name) )
  
   elif Age == int() and Age &lt; 18 and Height == int() and Height &gt; 148:
      print("You're not able to drive a car " + (Name) )
  
   elif Age and Height != int() :
       print ("Error! , Age or Height are not numbers")
  </code></pre>
  
  <p>error:</p>
  
  <blockquote>
    <p>"C:\Users\Ghanim\Desktop\Coding\Documents\Projects\Python\Project1\Project1.py", line 6
        break
           ^
    SyntaxError: 'break' </p>
    
    <p>outside loop</p>
  </blockquote>