Why is this surprising?  Floats are defined by the hardware essentially, not the language.<p>And this is how they work: they&#x27;re binary, not decimal.  Computers are binary, not decimal.  0.1 can&#x27;t be represented exactly as binary.<p>Python has a decimal type, if that&#x27;s what you want: <a href="https:&#x2F;&#x2F;docs.python.org&#x2F;2&#x2F;library&#x2F;decimal.html" rel="nofollow">https:&#x2F;&#x2F;docs.python.org&#x2F;2&#x2F;library&#x2F;decimal.html</a><p>I consider it a basic point of computer literacy to understand this.