Liftoff · 发射
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · 此页面需较新浏览器(支持 SharedArrayBuffer)。请升级 Chrome、Edge、Firefox 或 Safari 至最新版本。
This one builds on a lesson you haven't finished yet. Do that lesson first: · 此任务基于您尚未完成的课程。请先完成以下课程:
Python Basics · Python 基础 · While loops · while 循环 →
English
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.
中文
发射
从 5 倒数到 1,然后打印 Liftoff!。
while 循环只要条件为真就一直重复,所以循环内部必须改变变量,否则它永远不会停下。写在循环后面、没有缩进的代码,会在循环结束时运行一次。
Use a while loop to count down from 5 to · 到 1, one number per line, then print Liftoff!. · 用 while 循环从 5 倒数到 1,每个数一行,然后打印 Liftoff!。
Click Run to see the output here. · 点击“运行”查看此处输出。