a = 4.2 b =5.7
1.向下取整:int( )
int(a) = 4
int(b) = 5
2.向上取整:math.ceil( ) #需要先导入math库
math.ceil(a) = 5
math.ceil(b) = 6
3.四舍五入:round( )
round(a) = 4
round(b) = 6