title: Where does the 3 in my prime number list get appended?
body: <p>I can understand how every other prime number after 3 gets appended because (x%y != 0) but for the first iteration of the for loop it seems that x%y would equal 0. So how does it end up getting appended to my prime list?</p>
  
  <pre><code>def count_primes(num):
  # edge case: 1 and 0 are not prime numbers
      if num &lt; 2:
          return 0
  
  # create prime list, check length to find amount of primes up to input num
  # insert 2 bc it is only even prime number. Allows use of step in range to only iterate odds
      primes = [2]
  
  # create variable that holds prime candidates starting after 2
      x = 3
  
  # proceed into loop if prime candidate is less than or equal to input number
      while x &lt;= num:
  # cycle through odd numbers up to input number
          for y in range(3,x,2):
              if x%y == 0:
                  x += 2
                  break
          else:
              primes.append(x)
              x += 2
      return primes
  </code></pre>