Explica este c贸digo Python
Dificultad: F谩cil
print(not True * (100 + True))
馃憠 A. 101
馃憠 B. 0
馃憠 C. 100True
馃憠 D. SyntaxError
馃憠 B. Ya sabemos que Entonces es posible hacer operaciones aritm茅ticas con booleanos. Vamos por partes: En este ejercicio en concreto basta con saber que Respuesta:
0
True
infiere a 1
y False
infiere a 0
.
not True
equivale a False
, que en numeros equivale a 0
.100 + True
equivale a 101
porque True
es 1
.0 * 101
que nos da 0
not True
da 0
para inferir que el resultado total ser谩 0
(todo n煤mero multiplicado por 0
ser谩 0
ya que el 0
es neutro multiplicativo)