title: Guessing game in python
body: <p>I have only just started to learn to program following <a href="http://learnpythonthehardway.org" rel="nofollow">http://learnpythonthehardway.org</a>.
  After learning about loops and if-statements I wanted to try to make a simple guessing game.</p>
  
  <p>The problem is:</p>
  
  <p>If you make an incorrect guess it gets stuck and just keeps repeating either "TOO HIGH" or "TOO LOW" until you hit crtl C.</p>
  
  <p>I have read about while loops and have read other peoples code but I simply dont want to just copy the code.</p>
  
  <pre><code>print ''' This is the guessing game! 
  A random number will be selected from 1 to 10.
  It is your objective to guess the number!'''
  
  import random
  
  random_number = random.randrange(1, 10)
  guess = input("What could it be? &gt; ")
  correct = False
  
  while not correct:
      if guess == random_number:
          print "CONGRATS YOU GOT IT"
          correct = True
      elif guess &gt; random_number:
          print "TOO HIGH"
      elif guess &lt; random_number:
          print "TOO LOW"
      else:
          print "Try something else"
  </code></pre>