title: Guessing game won't work, also throwing weird syntax errors
body: <p>I've spent the better part of an 1.5 hours working on this thing, and I just can't get it to work. Before it started throwing these weird syntax errors, it would continue to say "guess to low, try again". It's not even running in the shell with these errors I've been getting.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>import random
  gend = random.randint(1,100) #make random number
  def compare(gend,guess): #start function
  
      guessnum = 0 #set guessnumber to zero for later printing
  
      if gend &lt; guess: #compare gend number against guessed number
          int(raw_input("Too high. Try again. ")) #request another number for user
          guessnum = guessnum + 1 #add 1 to guessnumber, for later printing
      elif gend &gt; guess: #compare gend number against guessed number
          int(raw_input("Too low. Try again. "))#request another number for user
          guessnum = guessnum + 1 #compare gend number against guessed number
      elif gend == guess: #if guessed number=gend, do this
              keepalive = 'much spook' #stop the while loop
              print "Congratulations! You got it in %d guess." % (guessnum)#print da amount of guesses
  
  keepalive = 'rekt' #keepalive substitute
  
  print 'Time to play a guessing game' #no exp needed
  
  guess = int(raw_input("Enter a number between 1 and 100: ") #start off the game
  
  while keepalive == 'rekt': #while loop that does all the work
      compare(gend,guess) #funcion werk
  
  raw_input("Any key to exit") #keep console open so it doesnt autoclose -.-
  </code></pre>
  
  <p>I'd also just like to say thanks to you guys who help, arguably the best learning resource for a good majority of languages. </p>