1
0
mirror of https://github.com/adambard/learnxinyminutes-docs.git synced 2025-08-10 16:54:33 +02:00

[python/es] include modulo and pow (#5226)

This commit is contained in:
Gustavo Adolfo Mejía Sánchez
2025-01-10 08:02:13 -05:00
committed by GitHub
parent a556cdedce
commit 155b0175fa

View File

@@ -34,13 +34,18 @@ Es básicamente pseudocódigo ejecutable.
# Sin embargo también tienes disponible división entera
34 // 5 # => 6
% El operador módulo
34 % 5 # => 4 # es el residuo de la división: 34 - (5 * 6) = 4
# Cuando usas un float, los resultados son floats
3 * 2.0 # => 6.0
# Exponenciación
4 ** 3 # => 64
# Refuerza la precedencia con paréntesis
(1 + 3) * 2 # => 8
# Valores 'boolean' (booleanos) son primitivos
True
False
@@ -49,7 +54,6 @@ False
not True # => False
not False # => True
# Igualdad es ==
1 == 1 # => True
2 == 1 # => False