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

Problem 14: Converting to Uppercase

A string S is given on one line from standard input. Convert all alphabetic characters in S to uppercase and output the result on one line. Non-alphabetic characters, such as digits, should be output unchanged.

Constraints

1 ≤ length of S ≤ 50

Input example 1

hello

Output example 1

HELLO

Input example 2

CodeDrill

Output example 2

CODEDRILL

What you'll train

Cover the edge cases

What you get

  • Explain how to handle non-target characters
  • Clarify the conversion rule
  • Specify the input range

How to ask the AI

Clearly tell the AI the exception handling: if the string contains non-alphabetic characters such as digits or symbols, they should be output unchanged. It's also good to consider what should happen if an empty string is given.

If you ask vaguelyIf a string containing symbols or digits is passed, the AI might delete them or convert them incorrectly.

あなたのコード

実行しました

プレビュー

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

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

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