Create a function called display_current_guess that prints out the guessed letters using the following instructions:
Lets assume the target word is 'CHICKEN'
User starts the game.
display_current_guess function prints: _
Try 1: User guesses 'A'
display_current_guess function prints: _
Try 2: User guesses 'K'
display_current_guess function prints: K
Try 3: User guesses 'C'
display_current_guess function prints: C C K
.
.
.
If the user guesses all the letters without exceeding the maximum failed attempts, the function prints out the full word.
When this happens, in your hangman function, a congratulatory message should be printed out and the program should stop.
Notes:
Think of the input you would need to pass into the function and the output (if any) .
The display_current_guess function is declared in the global scope but is called within the hangman function.
Create a function called
display_current_guess
that prints out the guessed letters using the following instructions: Lets assume the target word is 'CHICKEN'User starts the game.
display_current_guess
function prints: _Try 1: User guesses 'A'
display_current_guess
function prints: _Try 2: User guesses 'K'
display_current_guess
function prints: KTry 3: User guesses 'C'
display_current_guess
function prints: C C K. . .
If the user guesses all the letters without exceeding the maximum failed attempts, the function prints out the full word. When this happens, in your hangman function, a congratulatory message should be printed out and the program should stop.
Notes:
display_current_guess
function is declared in the global scope but is called within the hangman function.