Python 3.7.4(tags/v3.7.4:e09359112e, Jul 82019,20:34:20)[MSC v.191664bit(AMD64)] on win32
Type "help","copyright","credits" or "license()"for more information.>>> a =0.1+0.2>>> a
0.30000000000000004>>>print(a)0.30000000000000004>>>>>>round(0.1+0.2,1)0.3>>>round(0.1+0.2,2)0.3>>>round(0.1+0.2,3)0.3>>>print(round(0.1+0.2,2))0.3>>>round(0.1+0.2)0>>>round(0.1+0.2,0)0.0>>>round(0.1+0.2,2)==0.3
True
>>>>>>0.1+0.2==0.3
False
>>>round(0.1+0.2,1)==0.3
True
>>>>>>
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license()" for more information.>>> a = 0.1 + 0.2>>> a0.30000000000000004>>> print(a)0