Error caused while using round() function of Python. What can be the issue?
<p>While using <code>round(2.9239,2)</code>, it produced an output 2.99999999 rather than 2.92. In stackoverflow, I had read that the best way to deal with this is use string formatting upon the output. If that's the only way, why do we even have a round function? It is not even consistent across all the numbers. As in, some numbers it gives the correct output, for some it doesn't. </p>
