Star triangle · 星の三角形
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 · カウントループ →
English
Star triangle
Print a triangle of stars four rows high: one star, then two, then three, then four.
Multiplying a string repeats it: "ab" * 3 is "ababab". Let the loop variable say how many stars each row needs.
日本語
スター三角形
4行分の星印の三角形を出力します: 1個、次に2個、3個、最後に4個。
文字列を掛けると重複します: "ab" * 3 は "ababab" です。ループ変数を使って各行に必要な星印の数を指定してください。
Print a triangle of stars with 4 rows: *, **, ***, ****. Use a loop and "*" * n. · 4行の星の三角形を出力する:*、**、***、****。ループと"*" * nを使用する。
Click Run to see the output here. · 実行ボタンをクリックして出力を確認してください。