Why I got x=0.15000000000000002 during adding 0.050 in each step using while lopp in python : <p>I run the below python code, </p>

<pre><code>x=0
while x&lt;1:
    x+=0.050
    print(x)
</code></pre>

<p>and got the following result. Which I don't understand. </p>

<p>0.05
0.1
0.15000000000000002
0.2
0.25
0.3
0.35
0.39999999999999997
0.44999999999999996
0.49999999999999994
0.5499999999999999
0.6
0.65
0.7000000000000001
0.7500000000000001
0.8000000000000002
0.8500000000000002
0.9000000000000002
0.9500000000000003
1.0000000000000002</p>
