+ 2

Why False

Why 0.1+0.2==0.3 Output is false

16th Jun 2020, 2:45 PM
Mohammad
Mohammad - avatar
2 ответов
+ 3
Because 0.1 +0.2 = 0.300000004 != 0.3
16th Jun 2020, 2:58 PM
Abhay
Abhay - avatar
0
Try this for comparision upto 2 decimal places, print(round(0.1+0.2,2)==0.3)
16th Jun 2020, 3:03 PM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar