Avsnitt 1. Kapitel 2
single
Random Word
Svep för att visa menyn
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.
Uppgift
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
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 2
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal