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

Problem 41: Judging Clothing by Temperature

An integer N (temperature) is given on one line from standard input. If N is 30 or more, output Hot; if it is 20 or more but less than 30, output Warm; otherwise, output Cold.

Constraints

-50 ≤ N ≤ 50

Input example 1

35

Output example 1

Hot

Input example 2

25

Output example 2

Warm

What you'll train

State the constraints

What you get

  • Clarify boundary values
  • Express range branching
  • Specify output strings

How to ask the AI

Clearly tell the AI how to treat the boundaries: 30 or more is Hot, 20 or more but less than 30 is Warm, otherwise Cold. Specifying which side exactly 30 or exactly 20 falls into helps prevent misunderstanding.

If you ask vaguelyIf it's left ambiguous which range includes the exact boundary values (30 or 20), the AI may easily implement the comparison operators facing the wrong direction.

あなたのコード

実行しました

プレビュー

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

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

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