import math
- math.ceil(x):向上取整
>>>print(math.ceil(-7.5)) -7 >>>print(math.ceil(7.5)) 8
- math.fmod(a,b):返回a除以b的余数
>>>print(math.fmod(2,3)) 2.0 >>>print(math.fmod(2,1)) 0.0 >>>print(math.fmod(-10,-3)) -1.0

import math
>>>print(math.ceil(-7.5)) -7 >>>print(math.ceil(7.5)) 8
>>>print(math.fmod(2,3)) 2.0 >>>print(math.fmod(2,1)) 0.0 >>>print(math.fmod(-10,-3)) -1.0