平安_jmELOV
2025-02-22 23:53
>>> 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
Python3 入门教程(新版)
159135 学习 · 1108 问题
相似问题