Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Finish! | Main Body
Beginner Final Project: Hangman

book
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

  1. Call the load_words to set the word_list variable.
  2. Set the gameword by calling the choose_word_random variable.
  3. Call the hangman function.

Ratkaisu

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ää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 6
single

single

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ä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

We use cookies to make your experience better!
some-alt