title: Birthday Paradox, incorrect output by about 1
body: <p>I'm relatively new to python and wanted to test myself, by tackling the birthday problem. Rather than calculating it mathematically, I wanted to simulate it, to see if I would get the right answer. So I assigned all boolean values in the list sieve[] as False and then randomly pick a value from 0 to 364 and change it to True, if it's already True then it outputs how many times it had to iterate as an answer.</p>
  
  <p>For some reason, every time I run the code, I get a value between 24.5 and 24.8</p>
  
  <p>The expected result for 50% is 23 people, so why is my result 6% higher than it should be? Is there an error in my code?</p>
  
  <pre><code>import random
  
  def howManyPeople():
      sieve = [False] * 365
      count = 1
      while True:
          newBirthday = random.randint(0,364)
          if sieve[newBirthday]:
              return count
          else:
              sieve[newBirthday] = True
              count += 1
  
  def multipleRun():
      global timesToRun
      results = []
      for i in range(timesToRun):
          results.append(howManyPeople())
      finalResultAverage = sum(results)
      return (finalResultAverage / timesToRun)
  
  timesToRun = int(input("How many times would you like to run this code?"))
  
  print("Average of all solutions = " + str(multipleRun()) + " people")
  </code></pre>