A list of squares · 二乗のリスト
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 · Lists (1-D arrays) →
English
A list of squares
Build a list one item at a time instead of printing each value.
squares.append(x) adds x to the end of the list. Printing a whole list shows it in square brackets, with commas between the items.
日本語
二乗数のリスト
各値を出力する代わりに、1つずつリストを構築します。
squares.append(x) は x をリストの末尾に追加します。 リスト全体を印刷すると、項目間にコンマを挟んで角括弧で囲まれた形式で表示されます。
Start with an empty list, add the squares of 1 to 5 with .append(), then print the list. It should show [1, 4, 9, 16, 25]. · 空のリストから始め、1から5までの二乗を.append()で追加し、リストを出力する。結果は[1, 4, 9, 16, 25]となるはずだ。
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。