首页
随机页面
分类
Python教程
Python HOME]]
Python简介]]
Python入门]]
Python语法]]
Python注释]]
Python变量]]
Python数据类型]]
Python数字]]
Python类型转换]]
Python字符串]]
Python布尔值]]
Python运算符]]
Python列表]]
Python元组]]
Python集合]]
Python字典]]
Python If...Else]]
Python While循环]]
Python For循环]]
Python函数]]
Python Lambda]]
Python数组]]
Python类/对象]]
Python继承]]
Python迭代器]]
Python作用域]]
Python模块]]
Python日期]]
Python JSON]]
Python正则表达式]]
Python PIP包管理]]
Python Try...Except]]
Python输入交互]]
Python字符串格式化]]
文件处理
Python文件处理]]
Python文件读取]]
Python文件读写]]
Python文件删除]]
Python NumPy
NumPy简介]]
NumPy入门]]
NumPy数组创建]]
NumPy数组索引]]
NumPy数组切片]]
NumPy数据类型]]
NumPy数组复制与视图]]
NumPy数组形状]]
NumPy数组重塑]]
NumPy数组迭代]]
NumPy数组连接]]
NumPy数组拆分]]
NumPy数组搜索]]
NumPy数组排序]]
NumPy数组过滤]]
NumPy随机]]
Random简介]]
Data Distribution]]
Random Permutation]]
Seaborn Module]]
Normal Distribution]]
Binomial Distribution]]
Poisson Distribution]]
Uniform Distribution]]
Logistic Distribution]]
Multinomial Distribution]]
Exponential Distribution]]
Chi Square Distribution]]
Rayleigh Distribution]]
Pareto Distribution]]
Zipf Distribution]]
NumPy ufunc]]
ufunc Intro]]
ufunc Create Function]]
ufunc Simple Arithmetic]]
ufunc Rounding Decimals]]
ufunc Logs]]
ufunc Summations]]
ufunc Products]]
ufunc Differences]]
ufunc Finding LCM]]
ufunc Finding GCD]]
ufunc Trigonometric]]
ufunc Hyperbolic]]
ufunc Set Operations]]
机器学习
入门]]
Mean Median Mode]]
Standard Deviation]]
Percentile]]
Data Distribution]]
Normal Data Distribution]]
Scatter Plot]]
Linear Regression]]
Polynomial Regression]]
Multiple Regression]]
Scale]]
Train/Test]]
Decision Tree]]
Python MySQL
MySQL入门]]
MySQL创建数据库]]
MySQL创建表]]
MySQL插入]]
MySQL查询]]
MySQL Where]]
MySQL Order By]]
MySQL Delete]]
MySQL Drop Table]]
MySQL Update]]
MySQL Limit]]
MySQL Join]]
Python MongoDB
MongoDB入门]]
MongoDB创建数据库]]
MongoDB创建集合]]
MongoDB Insert]]
MongoDB Find]]
MongoDB Query]]
MongoDB Sort]]
MongoDB Delete]]
MongoDB Drop Collection]]
MongoDB Update]]
MongoDB Limit]]
Python参考
Python概述]]
Python内建函数]]
Python字符串方法]]
Python列表方法]]
Python字典方法]]
Python元组方法]]
Python集合方法]]
Python文件方法]]
Python关键字]]
Python异常]]
Python词汇表]]
模块参考
随机数模块]]
Requests模块]]
数学模块]]
CMath模块]]
Python How To
删除列表重复项]]
反转字符串]]
数字相加]]
查看“Python/module random”的源代码
来自菜鸟教程
←
Python/module random
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
<languages /> = Python随机模块 = Python有一个内置模块,可用于生成随机数。 The <code> random </code> 模块具有一组方法: {| ! 方法 ! 描述 |- | [[../ref_random_seed|种子()]] | 初始化随机数生成器 |- | [[../ref_random_getstate|getstate()]] | 返回随机数生成器的当前内部状态 |- | [[../ref_random_setstate|setstate()]] | 恢复随机数生成器的内部状态 |- | [[../ref_random_getrandbits|getrandbits()]] | 返回代表随机位的数字 |- | [[../ref_random_randrange|randrange()]] | 返回给定范围之间的随机数 |- | [[../ref_random_randint|randint()]] | 返回给定范围之间的随机数 |- | [[../ref_random_choice|选择()]] | 返回给定序列中的随机元素 |- | [[../ref_random_choices|选择()]] | 返回给定序列中随机选择的列表 |- | [[../ref_random_shuffle|随机播放]] | 取得序列并以随机顺序返回序列 |- | [[../ref_random_sample|样品()]] | 返回序列的给定样本 |- | [[../ref_random_random|随机()]] | 返回介于0和1之间的随机浮点数 |- | [[../ref_random_uniform|制服()]] | 返回两个给定参数之间的随机浮点数 |- | [[../ref_random_triangular|三角形()]] | 返回两个给定参数之间的随机浮点数,也可以设置模式参数以指定其他两个参数之间的中点 |- | betavariate() | 根据Beta分布返回一个介于0和1之间的随机浮点数(用于统计信息) |- | expovariate() | 根据指数分布(用于统计信息)返回随机浮点数 |- | gammavariate() | 返回基于Gamma分布的随机浮点数(用于统计信息) |- | 高斯() | 返回基于高斯分布的随机浮点数(用于概率论) |- | lognormvariate() | 返回基于对数正态分布的随机浮点数(用于概率论) |- | normalvariate() | 根据正态分布返回随机浮点数(用于概率论) |- | vonmisesvariate() | 根据von Mises分布返回一个随机浮点数(用于定向统计) |- | paretovariate() | 返回基于帕累托分布的随机浮点数(用于概率论) |- | weibullvariate() | 根据Weibull分布返回随机浮点数(用于统计信息) |} <br /> <br />
返回至“
Python/module random
”。