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函數
(未完待續。。。。)
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函數
(未完待續。。。。)