Liftoff · Lancement
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.
Décollage
Compte à rebours de 5 à 1, puis affichez Liftoff!.
Une boucle while répète tant que sa condition est vraie, donc quelque chose à l'intérieur doit changer la variable, sinon la boucle ne s'arrêtera jamais. Le code écrit après la boucle, sans indentation, s'exécute une fois quand la boucle se termine.
Use a while loop to count down from 5 to · à 1, one number per line, then print Liftoff!. · Utilisez une boucle while pour compter à rebours de 5 à 1, un nombre par ligne, puis imprimez Liftoff!.
Click Run to see the output here. · Cliquez sur Exécuter pour voir le résultat ici.