title: While loop with if/else statement in Python
body: <p>So I am still in the process of learning Python and I am having difficultly with <code>while</code> loops.  I have a sample of code below that includes <code>while</code> loop and <code>if</code> and <code>else</code> statements.  What I want it to do is print 'Less than 2' and 'Greater than 4' which it does, but it keeps running.  It does not print it just once each which is what I would want it to do.  Any help would be greatly appreciated!</p>
  
  <pre><code>counter = 1
  while (counter &lt; 5):
      count = counter
      if count &lt; 2:
          counter = counter + 1
      else:
          print('Less than 2')
      if count &gt; 4:
          counter = counter + 1
      else:
          print('Greater than 4')
      counter = counter + 1 
  </code></pre>