title: Python Number Guessing Game Need Help Avoiding Counting Duplicates in "Number of Guesses"
body: <p>I am brand new to learning Python and am building a very simple number guessing game. The user guesses a number between 1-100, and are given feedback on whether their guess is too low or too high. When they guess the number correctly, the program tells them how many guesses they took. What I need help with: telling the user when they guessed a duplicate number if they have entered it already. I also want to exclude any duplicate guesses from the final guess count. What is the easiest way to do this?</p>
  
  <p>Here is my game so far:</p>
  
  <pre><code>import random
  
  print("Guess a number between 1-100")
  
  the_number = random.randint(1, 100)
  guess = int(input(""))
  tries = 0
  
  while guess != the_number:
      if guess &gt; the_number:
          print("Lower")
      if guess &lt; the_number:
          print("Higher")
  
      guess = int(input("Guess again: "))
      tries += 1
      if guess == the_number:
          print("You win! The number was", the_number)
          print("And it only took you", tries, "tries!\n")
  </code></pre>