title: Python program that: Generates a random number between 1 and 100
body: <p>I have tried everything i can still doesn't work. Please any help would be appreciated.
  Please i have been able to allow it generate one hint, but i need it to generate 3 different hints the 3 different times the user presses 0 for the hint.
  I have it give the hint even OR odd. i need it to give extra 2 hints.
  <strong>Part 1:</strong></p>
  
  <ul>
  <li>Generates a random number between 1 and 100. </li>
  <li>Allows the user 10 tries to guess what the number is. </li>
  <li>Validates the user input (if user-input >100 or user-input&lt;0) then this is invalid input and should not cost the user to lose any tries.</li>
  <li>Gives feedback for each time the user makes a guess. The feedback tells the user whether the number entered is bigger, smaller, or equal to the number generated (and exits the program).</li>
  <li>Tells the user if they lost after he/she consumes all the 10 tries. Gives the user 10 tries to guess the number. If the user exhausts the 10 ties. The user loses. </li>
  </ul>
  
  <p><strong>Part 2:</strong></p>
  
  <ul>
  <li>After 2 unsuccessful tries, the program should start offering hints for the users (by having the user input the number 0).</li>
  <li>Each hint should be generated within a function of its own.</li>
  <li>Each hint will cost the user two tries (the program should indicate this to the user)</li>
  <li>The user is allowed a max of 3 hints only.</li>
  <li>The program should randomly pick which hint it is going to use and display to the user.
  <strong>(example of a hint is : 1-    The number is bigger than or equal the square of some X (X is an integer and is the largest integer square that is less than the user input))</strong></li>
  </ul>
  
  <p>Here is my program so far:</p>
  
  <pre><code>import random
  
  guessesTaken = 0
  
  print('WELCOME! What is your name?')
  myName = input()
  
  number = random.randint(1, 100)
  print('Hello, ' + myName + ', I generated a number between 1 and 100.')
  
  unsuccessful_tries = 0
  hint_taken = 0
  while guessesTaken &lt; 10:
      if unsuccessful_tries &gt; 1 and hint_taken&lt;3:
          print('Press 0 to get hint')
          need_hint = int(input())
          if need_hint == 0:
              hint_taken += 1
              guessesTaken += 1
          if number%2==0:     
              print('The Generated number is an EVEN number')
          else:
             print('The Generated number is an ODD number')
  
  
      print('Take a guess.\t%d Attempts Left'%(10 - guessesTaken))
      #10-guessTaken gives the number of tries left
      guess = input()
      guess = int(guess)
      #validating the user's input
      if guess &gt;100 or guess&lt;0:
          continue
  
      guessesTaken = guessesTaken + 1
  
      if guess &lt; number:
          print('Your guess is too low.')
      if guess &gt; number:
          print('Your guess is too high.')
  
      if guess == number:
          break
      unsuccessful_tries+=1
  
  if guess == number:
      guessesTaken = str(guessesTaken)
      print('Good job, ' + myName + '! You guessed my number in ' + guessesTaken + ' guesses!')
  
  if guess != number:
      number = str(number)
      print('Nope. The number I was thinking of was ' + number)
  </code></pre>