title: Why does my while loop output an out-of-bounds value?
body: <p>So I was doing while loops and I noticed something strange.</p>
  
  <pre><code>count = 0
  
  while count &lt;= 5:
      count += 1
      print(count)
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>1
  2
  3
  4
  5
  6
  </code></pre>
  
  <p>it's not that I don't understand while loops. It's that how come the count is printed up to six? when it's supposed to print <code>count</code> only if <code>count</code> is less than or equal to 5?</p>
  
  <p>and well 6 is beyond 5. why is this? </p>
  
  <p>I know I could do</p>
  
  <pre><code>count = 0
  
      while count != 5:
          count += 1
          print(count)
  </code></pre>
  
  <p>but I just want to understand why does putting <code>&lt;=</code> behave in an odd way?</p>