Зміст курсу
Beginner Final Project: Hangman
Beginner Final Project: Hangman
Main Body
We will be able to test hangman()
function while testing the final version of the game.
The hangman
function implements the body of the program. Here we need to take into account every possible user guess and print user-communicating messages. We will implement this function in 5 steps for the ease of work.
Завдання
- Set condition if the word isn't guessed using
is_word_guessed
function. 2 arguments:gameword
&used_letters
. - Print available letters using the
get_available_letters
function. 1 argument:used_letters
. - Set condition if the
guess
is not a letter. - Set condition if the letter (
guess
) has been used already using theused_letters
variable. - Set condition if the letter is in the
gameword
. - Set condition if the
guesses_remaining
is equal or lower than 0. - Print the
gameword
.
THIS CODE RETURNS AND PRINTS NOTHING! WE WILL TEST IT LATER
Дякуємо за ваш відгук!
Main Body
We will be able to test hangman()
function while testing the final version of the game.
The hangman
function implements the body of the program. Here we need to take into account every possible user guess and print user-communicating messages. We will implement this function in 5 steps for the ease of work.
Завдання
- Set condition if the word isn't guessed using
is_word_guessed
function. 2 arguments:gameword
&used_letters
. - Print available letters using the
get_available_letters
function. 1 argument:used_letters
. - Set condition if the
guess
is not a letter. - Set condition if the letter (
guess
) has been used already using theused_letters
variable. - Set condition if the letter is in the
gameword
. - Set condition if the
guesses_remaining
is equal or lower than 0. - Print the
gameword
.
THIS CODE RETURNS AND PRINTS NOTHING! WE WILL TEST IT LATER
Дякуємо за ваш відгук!
Main Body
We will be able to test hangman()
function while testing the final version of the game.
The hangman
function implements the body of the program. Here we need to take into account every possible user guess and print user-communicating messages. We will implement this function in 5 steps for the ease of work.
Завдання
- Set condition if the word isn't guessed using
is_word_guessed
function. 2 arguments:gameword
&used_letters
. - Print available letters using the
get_available_letters
function. 1 argument:used_letters
. - Set condition if the
guess
is not a letter. - Set condition if the letter (
guess
) has been used already using theused_letters
variable. - Set condition if the letter is in the
gameword
. - Set condition if the
guesses_remaining
is equal or lower than 0. - Print the
gameword
.
THIS CODE RETURNS AND PRINTS NOTHING! WE WILL TEST IT LATER
Дякуємо за ваш відгук!
We will be able to test hangman()
function while testing the final version of the game.
The hangman
function implements the body of the program. Here we need to take into account every possible user guess and print user-communicating messages. We will implement this function in 5 steps for the ease of work.
Завдання
- Set condition if the word isn't guessed using
is_word_guessed
function. 2 arguments:gameword
&used_letters
. - Print available letters using the
get_available_letters
function. 1 argument:used_letters
. - Set condition if the
guess
is not a letter. - Set condition if the letter (
guess
) has been used already using theused_letters
variable. - Set condition if the letter is in the
gameword
. - Set condition if the
guesses_remaining
is equal or lower than 0. - Print the
gameword
.
THIS CODE RETURNS AND PRINTS NOTHING! WE WILL TEST IT LATER