CJCoding With Joseph
15free / daySign inCreate account

Pin Entry

The PIN is 2468. Read entries with the prompt PIN: (stripped) for at most three attempts, counted with attempts and stopped by the unlocked flag in the loop condition, without a break. An entry that is not all digits (.isdigit()) prints Digits only. and does not use up an attempt; a wrong PIN uses one and prints Wrong PIN, <n> left. where n is 3 minus the attempts used; the right PIN prints Unlocked.. After the loop print Card kept. on its own line when the user never got in. Input: one entry per line. Prompts are part of the output.

Expected Output:

PIN: Unlocked.

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

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