title: Floating Point Python
body: <p>How this loop is performing and why it doesn't print 2.399999999999999</p>
  <pre><code>i = 1.2
  
  while i &lt; 2.4:
      print(i)
      i += 0.2
  </code></pre>
  <p>Also when I tried :</p>
  <pre><code>2.39999999999999999 &lt; 2.4
  </code></pre>
  <p>I got <code>False</code></p>
  <p>But when I tried :</p>
  <pre><code>2.399999999999999 &lt; 2.4
  </code></pre>
  <p>I got <code>True</code></p>
  <p>Can anyone explain why it is so ?</p>