I'm getting approximate values for start variable in below code:
start = 1
end = 2
incr = 0.2
while start < end:
print(start)
start = start + incr
Actual output:
1
1.2
1.4
1.5999999999999999
1.7999999999999998
1.9999999999999998
Hit any key to close this window...
Expected output:
1
1.2
1.4
1.6
1.8
I couldn't figure out why this is happening.