Kursinhalt
Beginner Final Project: Hangman
Beginner Final Project: Hangman
Is not a Letter
What if the user input &
or @
? We need to 'punish' the user by decreasing number of warnings (or guesses if there are no warnings left). Only one symbol !
means that the user is asking for the hint.
We need to take into account these cases.
Aufgabe
Swipe to start coding
- Set condition if the input is
'!'
. - Print possible matches using the
show_possible_matches
function and theget_guessed_word(gameword, used_letters)
as an argument. - Decrease the
warnings_remaining
by one. - Set condition if there are less than 0 (not included) warnings.
- Decrease the
guesses_reamaining
by one.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 3. Kapitel 2
Is not a Letter
What if the user input &
or @
? We need to 'punish' the user by decreasing number of warnings (or guesses if there are no warnings left). Only one symbol !
means that the user is asking for the hint.
We need to take into account these cases.
Aufgabe
Swipe to start coding
- Set condition if the input is
'!'
. - Print possible matches using the
show_possible_matches
function and theget_guessed_word(gameword, used_letters)
as an argument. - Decrease the
warnings_remaining
by one. - Set condition if there are less than 0 (not included) warnings.
- Decrease the
guesses_reamaining
by one.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 3. Kapitel 2