title: Python Prime number finder
body: <p>I have made a Prime number finder where you enter a number and it tells you weather it is a prime number.</p>
  
  <pre><code>while True:
      p = int(input('Enter a number '))
      for d in range(2, p):
          if p % d == 0:
              print(p, "is not a prime number!", d,"*", p//d,"=",p)
              break
          else:
              print(p, "is a prime number!")
              break
  </code></pre>
  
  <p>However it is displaying numbers that clearly aren't prime. I think it is only dividing it by 2 as all the odd numbers I have tried are being output as odd. </p>
  
  <p>Can anyone help to fix this?</p>