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

Problem 44: Counting Uppercase and Lowercase Letters

A string S consisting only of alphabetic characters is given on one line. Output the number of uppercase letters and the number of lowercase letters contained in S on one line, separated by a single space.

Constraints

1 ≤ length of S ≤ 100, S consists only of alphabetic characters

Input example 1

AbcDe

Output example 1

2 3

Input example 2

HELLO

Output example 2

5 0

What you'll train

Specify the output

What you get

  • Specify the output order
  • Specify the delimiter
  • Express character-type checks

How to ask the AI

Tell the AI concretely which comes first, the count of uppercase letters or lowercase letters, and that the separator should be a single space.

If you ask vaguelyIf you don't specify which comes first, uppercase or lowercase, the AI might output them in the reverse order.

あなたのコード

実行しました

プレビュー

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

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

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