CodeDrill
day_streak: --
← 問題一覧に戻る
Python ・ Standard I/O

Problem 46: Building a Staircase with Symbols

An integer N is given on one line. Output one * on the first line, two on the second line, and so on up to the Nth line, forming a staircase shape.

Constraints

1 ≤ N ≤ 30

Input example 1

3

Output example 1

*
**
***

Input example 2

1

Output example 2

*

What you'll train

Specify the output

What you get

  • Specify the number of lines
  • Express the repeating pattern
  • Clarify the output format

How to ask the AI

Tell the AI concretely the rule that N lines should be output and that the i-th line should display i asterisks, and that lines are separated by line breaks.

If you ask vaguelyIt's easy to leave ambiguous how the number of asterisks increases on each line, and whether an extra line break should be added after the final line.

あなたのコード

実行しました

プレビュー

AIレビュー(プロンプト練習)

コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。

先にコードを実行し、テストを1つ以上通してください。