title: prime number python for loops
body: <p><strong>Question:</strong></p>
  <p>A program that take a positive integer n as input and returns True if n is a prime number, otherwise returns False.</p>
  <p><strong>My Answer:</strong></p>
  <pre><code>n = int(input(&quot;Enter a number: &quot;))
  for i in range(2,n):
      if n%i == 0:
          print(False)
  print(True)
  </code></pre>
  <p>when I enter a prime number it works but when I enter a non prime number it doesn't work.</p>
  <p><strong>Example:</strong></p>
  <pre><code>&gt;&gt;&gt; 
  Enter a number: 12
  False
  False
  False
  False
  True
  &gt;&gt;&gt; 
  </code></pre>
  <p>please help!</p>