专门存放Python里面基础函数

1求绝对值abs()

2四舍五入round()

round(1.235)
1
round(1.235,2)#保留小数点后两位
1.24

3幂函数pow()

pow(2,3)
8

4余数%

5math模块

import math
math.floor(32.6)#取整并不是四舍五入
32
math.sqrt(4)#开方
2.0
还有很多

 

6numpy模块中函数

7函数

(未完待续。。。。)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章