title: python looping with functions break and continue outside loop
body: <p>I am new to programming and so i'm practicing a bid. At this point i'm practicing with functions. In the code below break and continue are outside the loop i can not see why. I've tryed out different ways but the only thing i get to work is the last block of code. Why are break and continue outside the loop here?<br>
      import random</p>
  
  <pre><code>again = 'y'
  
  while again == "y" :
      def main():
          print "gues a number between 0 - 10."
          nummer = random.randint(1,10)
          found = False
  
          while not found:
              usergues = input("your gues?")
              if usergues == nummer:
                  print 'Your the man'
                  found = True
              else:
                  print 'to bad dude try again'
  
  main()  
  again = raw_input('would you like to play again press y to play again   press n yo exit')
  if again == 'n':
      break   #here it says it is outside the loop 
  elif again != 'y':
      print 'oeps i don\'t know what you mean plz enter y to play again or n to exit'
  else:
  continue        #this is outside loop as well
  
  #main()
  </code></pre>