CJCoding With Joseph
15free / daySign inCreate account

Letters In Any Case

A letter menu: A) Add one adds one to a counter and prints Count: <n>, Q) Quit prints Goodbye! and leaves the loop, anything else prints Unknown choice - try again.. The dispatch is written; fix the line that reads the choice so that spaces around the letter and lower-case letters are accepted too, using .strip() and .upper() on what input() returns. Input: one choice per line, the last one q or Q. The prompt Choice: is part of the output, so each message follows it on the same line.

Expected Output:

A) Add one
Q) Quit
Choice: Count: 1
A) Add one
Q) Quit
Choice: Goodbye!

= newline. The output ends with a newline — print one after the last line.

Hints2 available
Topics:
Menus & Validation
📥 Auto-Input:
a \nq\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Ctrl+Space to expand shortcuts (pr, inp, def)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.