Tutorial de Python

Pitón INICIO Introducción a Python Python Empezar Sintaxis de Python Comentarios de Python Variables de Python Tipos de datos de Python Números de Python Fundición de Python Cadenas de pitón Booleanos de Python Operadores de Python Listas de Python Tuplas de Python Conjuntos de Python Diccionarios de Python Python si... si no Ciclos while de Python Python para bucles Funciones de Python pitón lambda Matrices de Python Clases/Objetos de Python Herencia de Python Iteradores de Python Alcance de Python Módulos de Python Fechas de Python Python Matemáticas PythonJSON Python expresión regular PIP de Python Prueba Python... Excepto Entrada de usuario de Python Formato de cadenas de Python

Manejo de archivos

Manejo de archivos de Python Python Leer archivos Python escribir/crear archivos Python Eliminar archivos

Módulos de Python

Tutorial NumPy Pandas Tutorial SciPy Tutorial

Matplotlib de Python

Introducción a Matplotlib Matplotlib Comenzar Pyplot de Matplotlib Trazado de Matplotlib Marcadores Matplotlib Línea Matplotlib Etiquetas Matplotlib Cuadrícula Matplotlib Subparcelas de Matplotlib Dispersión de Matplotlib Barras Matplotlib Histogramas de Matplotlib Gráficos circulares de Matplotlib

Aprendizaje automático

Empezando Media Mediana Moda Desviación Estándar percentil Distribución de datos Distribución normal de datos Gráfico de dispersión Regresión lineal Regresión polinomial Regresión múltiple Escala Entrenar/Prueba Árbol de decisión

pitón mysql

MySQL Empezar Crear base de datos MySQL Crear tabla MySQL Insertar MySQL Seleccionar MySQL mysql donde MySQL Ordenar por MySQL Eliminar Tabla desplegable de MySQL Actualización de MySQL Límite MySQL unirse a mysql

Python MongoDB

MongoDB Empezar MongoDB Crear base de datos MongoDB Crear colección Insertar MongoDB MongoDB Buscar Consulta MongoDB MongoDB Ordenar Eliminar MongoDB Colección de eliminación de MongoDB Actualización de MongoDB Límite de MongoDB

Referencia de Python

Descripción general de Python Funciones integradas de Python Métodos de cadenas de Python Métodos de lista de Python Métodos de diccionario de Python Métodos de tupla de Python Métodos de conjuntos de Python Métodos de archivos de Python Palabras clave de Python Excepciones de Python Glosario de Python

Referencia del módulo

Módulo aleatorio Módulo de Solicitudes Módulo de estadísticas Módulo Matemático cMódulo Matemático

Python Cómo

Eliminar duplicados de lista Invertir una cadena Añadir dos números

Ejemplos de Python

Ejemplos de Python Compilador de Python Ejercicios de pitón Cuestionario de Python Certificado de Python

Módulo matemático de Python


Módulo matemático de Python

Python tiene un módulo incorporado que puede usar para tareas matemáticas.

El mathmódulo tiene un conjunto de métodos y constantes.


métodos matemáticos

Method Description
math.acos() Returns the arc cosine of a number
math.acosh() Returns the inverse hyperbolic cosine of a number
math.asin() Returns the arc sine of a number
math.asinh() Returns the inverse hyperbolic sine of a number
math.atan() Returns the arc tangent of a number in radians
math.atan2() Returns the arc tangent of y/x in radians
math.atanh() Returns the inverse hyperbolic tangent of a number
math.ceil() Rounds a number up to the nearest integer
math.comb() Returns the number of ways to choose k items from n items without repetition and order
math.copysign() Returns a float consisting of the value of the first parameter and the sign of the second parameter
math.cos() Returns the cosine of a number
math.cosh() Returns the hyperbolic cosine of a number
math.degrees() Converts an angle from radians to degrees
math.dist() Returns the Euclidean distance between two points (p and q), where p and q are the coordinates of that point
math.erf() Returns the error function of a number
math.erfc() Returns the complementary error function of a number
math.exp() Returns E raised to the power of x
math.expm1() Returns Ex - 1
math.fabs() Returns the absolute value of a number
math.factorial() Returns the factorial of a number
math.floor() Rounds a number down to the nearest integer
math.fmod() Returns the remainder of x/y
math.frexp() Returns the mantissa and the exponent, of a specified number
math.fsum() Returns the sum of all items in any iterable (tuples, arrays, lists, etc.)
math.gamma() Returns the gamma function at x
math.gcd() Returns the greatest common divisor of two integers
math.hypot() Returns the Euclidean norm
math.isclose() Checks whether two values are close to each other, or not
math.isfinite() Checks whether a number is finite or not
math.isinf() Checks whether a number is infinite or not
math.isnan() Checks whether a value is NaN (not a number) or not
math.isqrt() Rounds a square root number downwards to the nearest integer
math.ldexp() Returns the inverse of math.frexp() which is x * (2**i) of the given numbers x and i
math.lgamma() Returns the log gamma value of x
math.log() Returns the natural logarithm of a number, or the logarithm of number to base
math.log10() Returns the base-10 logarithm of x
math.log1p() Returns the natural logarithm of 1+x
math.log2() Returns the base-2 logarithm of x
math.perm() Returns the number of ways to choose k items from n items with order and without repetition
math.pow() Returns the value of x to the power of y
math.prod() Returns the product of all the elements in an iterable
math.radians() Converts a degree value into radians
math.remainder() Returns the closest value that can make numerator completely divisible by the denominator
math.sin() Returns the sine of a number
math.sinh() Returns the hyperbolic sine of a number
math.sqrt() Returns the square root of a number
math.tan() Returns the tangent of a number
math.tanh() Returns the hyperbolic tangent of a number
math.trunc() Returns the truncated integer parts of a number

Constantes Matemáticas

Constant Description
math.e Returns Euler's number (2.7182...)
math.inf Returns a floating-point positive infinity
math.nan Returns a floating-point NaN (Not a Number) value
math.pi Returns PI (3.1415...)
math.tau Returns tau (6.2831...)