title: learning python--couldn't figure out random.randint
body: <p>I am learning python atm, and was doing an exercise from this <a href="http://en.wikibooks.org/wiki/Python_Programming/Loops/Solutions" rel="nofollow">site</a>--</p>
  
  <blockquote>
    <blockquote>
      <p>Instruct the user to pick an arbitrary number from 1 to 100 and proceed to guess it correctly within seven tries. After each guess, the user must tell whether their number is higher than, lower than, or equal to your guess.</p>
    </blockquote>
  </blockquote>
  
  <p>the code I wrote, but did not match the solution was this--</p>
  
  <pre><code>import random
  pick = int(input('number? '))
  count = 0
  
  while count &lt;= 7:
      number = random.randint(1, 10)
      count += 1
      print('is the number ', number, '?')
  
  if number &lt;= pick:
      print('press enter if higher')
      higher = input()
  elif number &gt;= pick:
      print('press enter if lower')
      lower = input()
  elif number == pick:
      print('good?')
      yes = input()
      break
  
  print('end')
  </code></pre>
  
  <p>I couldn't get this one right. When number ==pick, the loop did not end. Was it because of the random.randint that was mucking the elif number==pick ?</p>
  
  <p>The solution given in the site was way different from the one I wrote. How could I have done this better?</p>
  
  <p>Thanks!</p>