Define A Function Named Check Game Finished Encrypted List Which Takes A List Of Characters As A Parameter The Functi 1 (20.96 KiB) Viewed 10 times
Define a function named check_game_finished (encrypted_list) which takes a list of characters as a parameter. The function returns True if the game is over, "*" characters in the parameter list. and False otherwise. The game is over when there is no longer any For example: Test Result False True data = ['h', '*', '*', ¹*¹, ¹*'] print(check_game_finished (data)) data = ['h', 'e', '1', '1', 'o'] print(check_game_finished (data)) 'c', *', 'd'] False data = ['s', print(check_game_finished (data))
Define a function named get_word (words_list) that takes a list of words as a parameter. The function returns a random word from the parameter words list. Note: Do not import the random module. This has been done for you as part of the CodeRunner question. For example: Test Result random.seed (30) a data = get_word(['this', 'is', 'a', 'test']) print (data) random.seed (50) data = ['icy', 'any', 'are', 'hot', 'why'] print(get_word (data)) hot
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!