四舍五入 floor,ceil,round

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/CSU_GUO_LIANG/article/details/83110413
print(math.floor(2.34)) #2
print(math.ceil(2.34))  #3
print(round(2.34))     #2
print(round(2.54))     #3

猜你喜欢

转载自blog.csdn.net/CSU_GUO_LIANG/article/details/83110413