Conteúdo do Curso
Crafting a Classic Hangman Game
Crafting a Classic Hangman Game
Swipe to show menu
Hints 2/2
Revealing the Hint
The second phase of the hint mechanism is called show_possible_matches
. This function displays the word from the file (word_from_list
) if it corresponds to the current configuration of the gameword
.
Tarefa
Swipe to begin your solution
- Define the
show_possible_matches
function withword_to_match
as a parameter. - Initialize a
for
loop to iterate through the elements intest_word_list
. - Append an element to the
possible_matches
list ifhints_match
returnsTrue
. - Check if the
possible_matches
list is empty and set a corresponding condition.
Solução
Mark tasks as Completed
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 1. Capítulo 7
AVAILABLE TO ULTIMATE ONLY