Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Get GameWord | Game Word
Beginner Final Project: Hangman
course content

Course Content

Beginner Final Project: Hangman

Beginner Final Project: Hangman

1. Game Word
2. Hints
3. Main Body

Get GameWord

After every guess, we need to allow the user to understand the state of his/her guesses. We need to allow to see the number of right letters guessed already and the remaining letters that are needed to be guessed. To do that we create the get_guessed_word function.

Scroll down to see the whole task code!

Task

result_list is a list with the curent state of the gameword: right letters and gaps.

  1. Set the get_guessed_word function using the gameword and the letters_already_guessed as arguments.
  2. Set the for loop to work with the gameword using i as an iterator and range() function.
  3. Set condition to check if elements of the gameword are equal to the letters_already_guessed.
  4. Append the letter list(gameword)[i]) to the the result_list if condition is satisfied, append '_ '(with the space) otherwise.
  5. Test the function using the test_gameword and test_letters_already_guessed lists.

Task

result_list is a list with the curent state of the gameword: right letters and gaps.

  1. Set the get_guessed_word function using the gameword and the letters_already_guessed as arguments.
  2. Set the for loop to work with the gameword using i as an iterator and range() function.
  3. Set condition to check if elements of the gameword are equal to the letters_already_guessed.
  4. Append the letter list(gameword)[i]) to the the result_list if condition is satisfied, append '_ '(with the space) otherwise.
  5. Test the function using the test_gameword and test_letters_already_guessed lists.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 1. Chapter 4
toggle bottom row

Get GameWord

After every guess, we need to allow the user to understand the state of his/her guesses. We need to allow to see the number of right letters guessed already and the remaining letters that are needed to be guessed. To do that we create the get_guessed_word function.

Scroll down to see the whole task code!

Task

result_list is a list with the curent state of the gameword: right letters and gaps.

  1. Set the get_guessed_word function using the gameword and the letters_already_guessed as arguments.
  2. Set the for loop to work with the gameword using i as an iterator and range() function.
  3. Set condition to check if elements of the gameword are equal to the letters_already_guessed.
  4. Append the letter list(gameword)[i]) to the the result_list if condition is satisfied, append '_ '(with the space) otherwise.
  5. Test the function using the test_gameword and test_letters_already_guessed lists.

Task

result_list is a list with the curent state of the gameword: right letters and gaps.

  1. Set the get_guessed_word function using the gameword and the letters_already_guessed as arguments.
  2. Set the for loop to work with the gameword using i as an iterator and range() function.
  3. Set condition to check if elements of the gameword are equal to the letters_already_guessed.
  4. Append the letter list(gameword)[i]) to the the result_list if condition is satisfied, append '_ '(with the space) otherwise.
  5. Test the function using the test_gameword and test_letters_already_guessed lists.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

Section 1. Chapter 4
toggle bottom row

Get GameWord

After every guess, we need to allow the user to understand the state of his/her guesses. We need to allow to see the number of right letters guessed already and the remaining letters that are needed to be guessed. To do that we create the get_guessed_word function.

Scroll down to see the whole task code!

Task

result_list is a list with the curent state of the gameword: right letters and gaps.

  1. Set the get_guessed_word function using the gameword and the letters_already_guessed as arguments.
  2. Set the for loop to work with the gameword using i as an iterator and range() function.
  3. Set condition to check if elements of the gameword are equal to the letters_already_guessed.
  4. Append the letter list(gameword)[i]) to the the result_list if condition is satisfied, append '_ '(with the space) otherwise.
  5. Test the function using the test_gameword and test_letters_already_guessed lists.

Task

result_list is a list with the curent state of the gameword: right letters and gaps.

  1. Set the get_guessed_word function using the gameword and the letters_already_guessed as arguments.
  2. Set the for loop to work with the gameword using i as an iterator and range() function.
  3. Set condition to check if elements of the gameword are equal to the letters_already_guessed.
  4. Append the letter list(gameword)[i]) to the the result_list if condition is satisfied, append '_ '(with the space) otherwise.
  5. Test the function using the test_gameword and test_letters_already_guessed lists.

Switch to desktop for real-world practiceContinue from where you are using one of the options below

Everything was clear?

After every guess, we need to allow the user to understand the state of his/her guesses. We need to allow to see the number of right letters guessed already and the remaining letters that are needed to be guessed. To do that we create the get_guessed_word function.

Scroll down to see the whole task code!

Task

result_list is a list with the curent state of the gameword: right letters and gaps.

  1. Set the get_guessed_word function using the gameword and the letters_already_guessed as arguments.
  2. Set the for loop to work with the gameword using i as an iterator and range() function.
  3. Set condition to check if elements of the gameword are equal to the letters_already_guessed.
  4. Append the letter list(gameword)[i]) to the the result_list if condition is satisfied, append '_ '(with the space) otherwise.
  5. Test the function using the test_gameword and test_letters_already_guessed lists.

Switch to desktop for real-world practiceContinue from where you are using one of the options below
Section 1. Chapter 4
Switch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt