Rules of the Game
Rules of the Hangman
Function plan and its connection
Final playable game version
After finishing writing the code we will be able to test our game using the file with words. During the course to test functions, we will have small words lists.
Let's prepare to the Hangman!
First, we need to import libraries needed for work and set new function. This function, which is named load_words() is used to get all words from one given file. During the project, we will name this file word_list.
Use hints if needed!
Swipe to start coding
- Import the
randomlibrary. - Import the
stringlibrary. - Set new function
load_wordsthat will load words from the file. - Set
word_listfile variable that includes words for the game. - Return
word_listvariable.
Ratkaisu
Kiitos palautteestasi!
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Tiivistä tämä luku
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 7.69
Rules of the Game
Pyyhkäise näyttääksesi valikon
Rules of the Hangman
Function plan and its connection
Final playable game version
After finishing writing the code we will be able to test our game using the file with words. During the course to test functions, we will have small words lists.
Let's prepare to the Hangman!
First, we need to import libraries needed for work and set new function. This function, which is named load_words() is used to get all words from one given file. During the project, we will name this file word_list.
Use hints if needed!
Swipe to start coding
- Import the
randomlibrary. - Import the
stringlibrary. - Set new function
load_wordsthat will load words from the file. - Set
word_listfile variable that includes words for the game. - Return
word_listvariable.
Ratkaisu
Kiitos palautteestasi!
single