title: Printing prime numbers up to a user's input
body: <p>I am making a quick program that will ask the user for a number and then output all the prime numbers up to that number:</p>
  
  <pre><code>n=int(input("Enter a number: "))
  a=2
  if n&lt;=1:
      n=int(input("Enter another number: "))
  while a&lt;n:
      for i in range(2,n):
          if a%i==0:
              break
          else:
              print (a)
              break
      a=a+1
  </code></pre>
  
  <p>The problem I am having is that it won't print out <code>2</code>. For example, if I use <code>20</code> as my <code>n</code> value, it will print:</p>
  
  <pre><code>Enter a number: 20
  3
  5
  7
  9
  11
  13
  15
  17
  19
  </code></pre>