CJCoding With Joseph
15free / daySign inCreate account

Choice In Range

Read a menu choice with the prompt Choice (1-3): and keep re-asking, printing Pick 1, 2 or 3. each time, until the stripped text is exactly 1, 2 or 3; then print You picked <choice>.. Compare the text itself, no conversion needed. Input: one answer per line; the last line is valid. The prompt is part of the output, so each message follows a prompt on the same line.

Expected Output:

Choice (1-3): Pick 1, 2 or 3.
Choice (1-3): Pick 1, 2 or 3.
Choice (1-3): You picked 3.

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

Hints3 available
Topics:
Menus & Validation
📥 Auto-Input:
5\nx\n3\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.