>>> Length=3.14 >>> Width=1.57 >>> result=round(Length*Width,2)# >>> print(result) 4.93 >>> result=round(Length/Width,3)# >>> print(result) 2.0 除法为什么保留3为小数结果会是2.0
因为2.0000000 python自动省略了多余的0