CJCoding With Joseph
15free / daySign inCreate account

Upper Or Lower Menu

Read a word with the prompt Word: , then show a three-item menu: 1) Upper case prints the word in capitals using .upper(), 2) Lower case prints it in small letters using .lower(), 3) Quit prints Goodbye! and leaves the loop, and anything else prints Unknown choice - try again.. Read the choice with the prompt Choice: and strip it. Input: the word, then one choice per line ending with 3. Prompts are part of the output, so the word prompt sits in front of the first menu line and each result follows Choice: .

Expected Output:

Word: 1) Upper case
2) Lower case
3) Quit
Choice: HELLO
1) Upper case
2) Lower case
3) Quit
Choice: hello
1) Upper case
2) Lower case
3) Quit
Choice: Goodbye!

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

Hints2 available
Topics:
Menus & Validation
📥 Auto-Input:
Hello\n1\n2\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.