Zero to four · 从零到四
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 基础 · Counting loops · 计数循环 →
English
Zero to four
Print the numbers 0, 1, 2, 3, 4, one per line, using range(5).
⚠️ range(5) starts at 0 and stops before 5 — five numbers, none of them 5. That is the same rule as a slice.
中文
从零到四
用 range(5) 打印数字 0、1、2、3、4,每个一行。
⚠️ range(5) 从 0 开始,在 5 之前停下 —— 一共五个数,但没有 5。这和切片是同一条规则。
Print the numbers 0, 1, 2, 3, 4, one per line, using range(5). · 用 range(5) 打印数字 0、1、2、3、4,每个一行。
Click Run to see the output here. · 点击“运行”查看此处输出。