+ 2
[DUPLICATE] Why 0.1+0.2 is not equal to 0.3 in python?
a=0.1 b=0.2 print(a+b==0.3) ####output### false I did some googling but I find the explanations very difficult to understand, I am beginner in programming
2 Answers
+ 8
It's already answered here đ
https://www.sololearn.com/discuss/1288636/?ref=app
+ 5
Maybe this can help you.
https://www.quora.com/Why-is-0-1+0-2-not-equal-to-0-3-in-most-programming-languages
This is because 0.2+0.1 in python is equal to 0.300000000000004
https://code.sololearn.com/cfFUvWsOz4qe/#py