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

Problem 17: Is It a Palindrome?

A string S is given on one line from standard input. If S is a palindrome (reads the same forwards and backwards), output Yes; otherwise, output No, on one line.

For example, level is a palindrome, so the answer is Yes, while hello is not, so the answer is No.

Constraints

1 ≤ length of S ≤ 100 (S consists only of lowercase letters)

Input example 1

level

Output example 1

Yes

Input example 2

hello

Output example 2

No

What you'll train

Cover the edge cases

What you get

  • Explain how to handle case sensitivity
  • Specify the output wording
  • Clarify the judgment criteria

How to ask the AI

Tell the AI whether to distinguish between uppercase and lowercase letters, and how to judge the result for an empty string or a single character. It's also important to keep the output wording consistent, such as Yes/No exactly as specified.

If you ask vaguelyIf a string with mixed uppercase and lowercase letters is passed, the AI might make its own decision about case sensitivity without it being specified.

あなたのコード

実行しました

プレビュー

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

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

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