Count to ten · 10まで数える
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 · Counting loops · カウントループ →
Count to ten
Print the whole numbers from 1 to 10, each on its own line.
A for loop repeats its indented lines once for every value it is given. range(1, 4) gives 1, 2, 3: it stops before its second number, so choose that number with care.
Use a for loop to print the numbers 1 to 10, one per line. · forループを使用して、1から10までの数をそれぞれ1行ずつ出力する。
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。