Random Word
To play the game it is needed to choose one gameword
randomly from the word_list
. To do that we create choose_word_random
function.
Task
Swipe to start coding
- Set the
choose_word_random
function using theword_list
as an argument. - Return random word from the
word_list
inside the function usingrandom.choice(...)
function. - Test the function using the
test_word_list
list.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 1. ChapterΒ 2
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Summarize this chapter
Explain the code in file
Explain why file doesn't solve the task
Awesome!
Completion rate improved to 7.69
Random Word
Swipe to show menu
To play the game it is needed to choose one gameword
randomly from the word_list
. To do that we create choose_word_random
function.
Task
Swipe to start coding
- Set the
choose_word_random
function using theword_list
as an argument. - Return random word from the
word_list
inside the function usingrandom.choice(...)
function. - Test the function using the
test_word_list
list.
Solution
Everything was clear?
Thanks for your feedback!
Awesome!
Completion rate improved to 7.69SectionΒ 1. ChapterΒ 2
single