math模块
# 数学相关模块
import math
r = math.floor(3.2) # 向下取整
print(r)
r = math.ceil(4.5) # 向上取整
print(r)
r = round(3.4999) # 四舍五入
print(r)
r = math.pow(3,4) # =3**4
print(r)
r = math.sqrt(25) # 开平方
print(r)
r = math.fabs(-0.23) # 绝对值(小数)
print(r)
r = abs(-2) # 绝对值
print(r)
r = math.modf(3.14) # 拆