math.floor()
向下取整
>>> math.floor(-12.4)
-13
>>> math.floor(-12.5)
-13
>>> math.floor(-12.6)
-13
>>> math.floor(12.4)
12
>>> math.floor(12.5)
12
>>> math.floor(12.6)
12
round()
四舍五入,当保留位数的前一位为奇数时.5进,偶数时.5不进
>>> round(0.1115, 3)
0.112
>>> round(0.1215, 3)
0.121