I think another contributor to the author&#x27;s surprise is this subtle detail about the behavior of Python&#x27;s `print` statement.  From the docs[1]:<p>Python only prints a decimal approximation to the true decimal value of the binary approximation stored by the machine. If Python were to print the true decimal value of the binary approximation stored for 0.1, it would have to display<p><pre><code>    &gt;&gt;&gt; 0.1
    0.1000000000000000055511151231257827021181583404541015625

</code></pre>
That is more digits than most people find useful, so Python keeps the number of digits manageable by displaying a rounded value instead<p><pre><code>    &gt;&gt;&gt; 0.1
    0.1
</code></pre>
[1] <a href="https:&#x2F;&#x2F;docs.python.org&#x2F;2&#x2F;tutorial&#x2F;floatingpoint.html" rel="nofollow">https:&#x2F;&#x2F;docs.python.org&#x2F;2&#x2F;tutorial&#x2F;floatingpoint.html</a>