Liftoff · Despegue
Liftoff
Count down from 5 to 1, then print Liftoff!.
A while loop repeats as long as its condition is true, so something inside the loop must change the variable, or the loop never stops. Code written after the loop, without indentation, runs once when the loop ends.
Despegue
Cuenta regresiva desde 5 hasta 1, luego imprime Liftoff!.
Un bucle while se repite mientras su condición sea verdadera, por lo que algo dentro del bucle debe modificar la variable, de lo contrario el bucle nunca se detendrá. El código escrito después del bucle, sin sangría, se ejecuta una sola vez cuando termina el bucle.
Use a while loop to count down from 5 to · hasta 1, one number per line, then print Liftoff!. · Usa un bucle while para contar hacia atrás desde 5 hasta 1, un número por línea, y luego imprime Liftoff!.
Click Run to see the output here. · Haz clic en Ejecutar para ver la salida aquí.