1、import math
Math.pi
一些常量
Math.sqrt(80)
开平方根
Math.pow(x,y)
x的y次方
Math.factorial(x)
x的阶乘
Math.log10(2**1000)
求log10 N
2、import random
Random.random()
0-1随机浮点数
Random.choice([3,4,5,6,2,8])
列表随机选一个
Random.randint(a,b)
a-b之间的整数随机选一个
Random.uniform(a,b)
a-b均匀分布的随机数
Random.gauss(mu,lamda)
高斯分布,均值和方差
3、numpy
4、scipy
注:
dir(math)
查询库里面的函数
help(math)
查看每个函数怎么用