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.
Oppgave
Swipe to start coding
- Set the
choose_word_randomfunction using theword_listas an argument. - Return random word from the
word_listinside the function usingrandom.choice(...)function. - Test the function using the
test_word_listlist.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 2
single
Spør AI
Spør AI
Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår
Awesome!
Completion rate improved to 7.69
Random Word
Sveip for å vise menyen
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.
Oppgave
Swipe to start coding
- Set the
choose_word_randomfunction using theword_listas an argument. - Return random word from the
word_listinside the function usingrandom.choice(...)function. - Test the function using the
test_word_listlist.
Løsning
Alt var klart?
Takk for tilbakemeldingene dine!
Seksjon 1. Kapittel 2
single