Finish!
Below the task you will find the link with your Hangman game! Test it!
Super! We have to organize the main function to gather all functions we have created earlier.
Tehtävä
Swipe to start coding
- Call the
load_words
to set theword_list
variable. - Set the
gameword
by calling thechoose_word_random
variable. - Call the
hangman
function.
Ratkaisu
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
def hangman(gameword):
pass
def load_words():
pass
def choose_word_random(word_list):
pass
if __name__ == '__main__':
# Call the load_words() function
word_list = load_words()
# Set the gameword
gameword = choose_word_random(word_list)
# Call the hangman() function
hangman(gameword)
Go here to test the game!
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 3. Luku 6
single
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def hangman(gameword):
pass
def load_words():
pass
def choose_word_random(word_list):
pass
if __name__ == '__main__':
# Call the load_words() function
word_list = ___()
# Set the gameword
___ = choose_word_random(word_list)
# Call the hangman() function
___(gameword)
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme