python中的math,random,statistic

python标准库的math库

Number-theoretic and representation functions

math.ceil(x)

math.copysign(x, y)

math.fabs(x)

math.factorial(x)

math.floor(x)

math.fmod(x, y)

math.frexp(x)

math.fsum(iterable)

math.gcd(a, b)

math.isclose(a, b, *, rel_tol=1e-09, abs_tol=0.0)

math.isfinite(x)

math.isinf(x)

math.isnan(x)

math.ldexp(x, i)

math.modf(x)

math.trunc(x)

Power and logarithmic functions

math.exp(x)

math.expm1(x)

math.log(x[, base])

math.log1p(x)

math.log2(x)

math.log10(x)

math.pow(x, y)

math.sqrt(x)

Trigonometric functions

math.acos(x)

math.asin(x)

math.atan(x)

math.atan2(y, x)

math.cos(x)

math.hypot(x, y)

math.sin(x)

math.tan(x)

Angular conversion

math.degrees(x)

math.radians(x)

Hyperbolic functions

math.acosh(x)

math.asinh(x)

math.atanh(x)

math.cosh(x)

math.sinh(x)

math.tanh(x)

Special functions

math.erf(x)

math.erfc(x)

math.gamma(x)

math.lgamma(x)

Constants

math.pi

math.e

math.inf

math.nan

python标准库的random

Bookkeeping functions:

random.seed(a=None, version=2)

random.getstate()

random.setstate(state)

random.getrandbits(k)

Functions for integers:

random.randrange(start, stop[, step])

random.randint(a, b)

Functions for sequences:

random.choice(seq) # 选一个

random.shuffle(x[, random])

random.sample(population, k) # 选多个

specific real-valued distributions:

random.random()

random.uniform(a, b)

random.triangular(low, high, mode)

random.betavariate(alpha, beta)

random.expovariate(lambd)

random.gammavariate(alpha, beta)

random.gauss(mu, sigma)

random.lognormvariate(mu, sigma)

random.normalvariate(mu, sigma)

random.vonmisesvariate(mu, kappa)

random.paretovariate(alpha)

random.weibullvariate(alpha, beta)

class random.SystemRandom([seed])

python标准库的statistics

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wugou2014

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值