A numeric password
Task
The program asks the user for a password that must be a whole number. While the input is not a whole number, it prints zadaj cele cislo (enter a whole number) and asks again. Once it gets a whole number, it prints heslo: followed by the number.
Examples
Input
abc 12.5 1234
Expected output
zadaj cele cislo zadaj cele cislo heslo: 1234
Rules
Handle the input with
try/except.The
exceptbranch is missing.
After you submit, 3 hidden tests will also check your solution: right at once, a negative number, an empty line.
Python starts the first time you run code.
Ctrl+Enter runs the program. Tab indents. Press Esc, then Tab, to leave the editor.
Input (stdin)
Each line = one call to input().
Output
Hints
Try it yourself first. Each hint reveals a little more - and lowers the reward a little.
Signed out, hints are free - but no XP is awarded either.
Solution
The solution unlocks after the last hint.