IT入门 > 教程 >
  • Python math.remainder() 方法 日期:2022-09-11 点击:9457 python

    Python mathremainder(x, y) 方法返回 x/y 的余数。 Python 版本:3.7 语法 math.remainder() 方法语法如下: math.remainder(x, y) 参数说明: x -- 必需,被除数。 y -- 可选,除数。必须是非零数字,否则会...

  • Python math.sin() 方法 日期:2022-09-11 点击:5894 python

    Python math.sin(x) 返回 x 弧度的正弦值。 要获取指定角度的正弦,必须首先使用 math.radians() 方法将其转换为弧度。 Python 版本: 1.4 语法 math.sin() 方法语法如下: math.sin(x) 参数说明: x -- 必...

  • Python math.sinh() 方法 日期:2022-09-11 点击:9042 python

    Python math.sinh(x) 返回 x 的双曲正弦值。 Python 版本:1.4 语法 math.sinh() 方法语法如下: math.sinh(x) 参数说明: x -- 必需,个正数或负数。如果 x 不是一个数字,返回 TypeError。 返回值 返回一...

  • Python math.sqrt() 方法 日期:2022-09-11 点击:1038 python

    Python math.sqrt(x) 方法返回 x 的平方根。 数字必须大于等于 0。 语法 math.sqrt() 方法语法如下: math.sqrt(x) 参数说明: x -- 必需,数字。如果 x 不是一个数字,返回 TypeError。如果数字小于...

  • Python math.tan() 方法 日期:2022-09-11 点击:2786 python

    Python math.tan(x) 返回 x 弧度的正切值。 Python 版本: 1.4 语法 math.tan() 方法语法如下: math.tan(x) 参数说明: x -- 必需,数字。如果 x 不是数字,则返回 TypeError。 返回值 返回一个浮点数,表...

  • Python math.tanh() 方法 日期:2022-09-11 点击:5812 python

    Python math.tanh(x) 返回 x 的双曲正切值。 Python 版本:1.4 语法 math.tanh() 方法语法如下: math.tanh(x) 参数说明: x -- 必需,个正数或负数。如果 x 不是一个数字,返回 TypeError。 返回值 返回一...

  • Python math.trunc() 方法 日期:2022-09-11 点击:9992 python

    Python math.trunc(x) 方法返回 x 截断整数的部分,即返回整数部分,忽略小数部分。 math.trunc(x) 方法不会将数字向上/向下舍入到最接近的整数,而只是删除小数。 语法 math.trunc() 方法语法如...

  • Python random randrange() 方法 日期:2022-09-11 点击:5358 python

    Python random.randrange() 方法返回指定范围内的随机数。 语法 random.randrange() 方法语法如下: random.randrange(start, stop, step) 参数说明: start -- 可选, 一个整数,指定开始值,默认值为 0。 s...

  • Python random randint() 方法 日期:2022-09-11 点击:2619 python

    Python random.randint() 方法返回指定范围内的整数。 randint(start, stop) 等价于 randrange(start, stop+1) 。 语法 random.randint() 方法语法如下: random.randint(start, stop) 参数说明: start -- 必需, 一个整...

  • NumPy 教程 日期:2022-09-18 点击:2343 numpy

    NumPy(Numerical Python) 是 Python 语言的一个扩展程序库,支持大量的维度数组与矩阵运算,此外也针对数组运算提供大量的数学函数库。 NumPy 的前身 Numeric 最早是由 Jim Hugunin 与其它协作者共...