Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Hints 2/2 | Crafting a Classic Hangman Game
Crafting a Classic Hangman Game
course content

Зміст курсу

Crafting a Classic Hangman Game

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.

Завдання

  1. Define the show_possible_matches function with word_to_match as a parameter.
  2. Initialize a for loop to iterate through the elements in test_word_list.
  3. Append an element to the possible_matches list if hints_match returns True.
  4. Check if the possible_matches list is empty and set a corresponding condition.

Завдання

  1. Define the show_possible_matches function with word_to_match as a parameter.
  2. Initialize a for loop to iterate through the elements in test_word_list.
  3. Append an element to the possible_matches list if hints_match returns True.
  4. Check if the possible_matches list is empty and set a corresponding condition.

Mark tasks as Completed
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

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.

Завдання

  1. Define the show_possible_matches function with word_to_match as a parameter.
  2. Initialize a for loop to iterate through the elements in test_word_list.
  3. Append an element to the possible_matches list if hints_match returns True.
  4. Check if the possible_matches list is empty and set a corresponding condition.

Mark tasks as Completed
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 1. Розділ 7
AVAILABLE TO ULTIMATE ONLY
We're sorry to hear that something went wrong. What happened?
some-alt