You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
638 B
16 lines
638 B
from lab0maksktl.hangman import get_random_word |
|
|
|
|
|
def test_hangman(): |
|
WORDS = ("python", "jumble", "easy", "difficult", "answer", "xylophone", "hangman", |
|
"computer", "science", "programming", "mathematics", "player", "condition", |
|
"reverse", "water", "board", "geeks", "keyboard", "laptop", "headphone", |
|
"mouse", "printer", "scanner", "software", "hardware", "network", "server") |
|
assert find_in_word_list(get_random_word(), WORDS) |
|
|
|
|
|
def find_in_word_list(word, list_of_words) -> bool: |
|
for list_part in list_of_words: |
|
if word == list_part: |
|
return True |
|
return False
|
|
|