Course Content
Hangman Game Project
Hangman Game Project
Case 1
! is for the hint and % is not for the hint
What if the user input &
or @
? We need to punish the user by decreasing the number of warnings (or guesses if no warnings are left). Only one symbol, !
means the user is asking for the hint.
We need to take into account these cases.
Task
- 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.
Everything was clear?
Section 1. Chapter 9
Start learning today and achieve
coding mastery
- Master Python, SQL, JavaScript & more.
- Learn with Step-by-Step Lessons.
- Get Ready for Real-World Projects.
- Earn a Certificate Upon Completion.