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

Conteúdo do Curso

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!

Tarefa

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.

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 1. Capítulo 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!

Tarefa

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.

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

Seção 1. Capítulo 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!

Tarefa

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.

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo

Tudo estava claro?

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!

Tarefa

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.

Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 1. Capítulo 4
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt