Guess the word
Task
The user enters words, each on its own line, until they write the right one: informatika (letter case does not matter).
After every wrong word the program prints nespravne (wrong). When the right word comes, it prints spravne (right) and on the next line the number of attempts including the last one.
Examples
Input
python java informatika
Expected output
nespravne nespravne spravne 3
Rules
Use a
whileloop in this lesson.
After you submit, 3 hidden tests will also check your solution: right at once, in capitals, several attempts, a sentence containing the word.
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.