主页
Python
Python 数学运算
demo_math_ceil_floor
运行 ❯
×
更改方向
保存代码
更改主题
#Import math library import math #Round a number upward to its nearest integer x = math.ceil(1.4) #Round a number downward to its nearest integer y = math.floor(1.4) print(x) print(y)
2
1