title: Python - prime numbers behaving badly
body: <p>I'm writing a prime number program and I'd like a hint, it currently prints primes except for numbers divisible by 3 and 5 in starting at 9 and 15, but somehow accurately computes 20, also a multiple of 5, as not prime. Any help appreciated. Using python 2 because I'm on an old Vaio with no net connection.</p>
  
  <pre><code>def main():
      nums = [2]
      dividend = 3
  
      while i &lt; 30:
          if dividend % nuns[i] &gt; 0:
                  print divided, 'is prime'
                  nums.append(dividend)
                  dividend = dividend + 1
         if dividend % nums[i] == 0:
                  print divided, 'is not prime'
                  nums.append(dividend)
                  dividend = dividend + 1
         i = i + 1
  main()
  </code></pre>