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

Зміст курсу

Crafting a Classic Hangman Game

Random Word Generator

How to choose the word for the game?

To play the game, it is necessary to choose one game word randomly from the word_list. To do that, we create the choose_word_random function.

Завдання

  1. Define the function choose_word_random with word_list as a parameter.
  2. Inside the function, return a randomly selected word from word_list using the random.choice(...) method.

Завдання

  1. Define the function choose_word_random with word_list as a parameter.
  2. Inside the function, return a randomly selected word from word_list using the random.choice(...) method.

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

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

How to choose the word for the game?

To play the game, it is necessary to choose one game word randomly from the word_list. To do that, we create the choose_word_random function.

Завдання

  1. Define the function choose_word_random with word_list as a parameter.
  2. Inside the function, return a randomly selected word from word_list using the random.choice(...) method.

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