QuestenaPráctica que te muestra qué repasar después
Pregunta 112

What are the exact value and type of 4 / 2 in Python?

  1. int 2
  2. int 0
  3. float 2.5
  4. float 2.0Respuesta correcta

Explicación

The slash performs true division, so integer operands still produce the floating-point value 2.0. An exact whole-number quotient does not cause Python to switch the result back to int.

Continúa con este test

Empezar la práctica