Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python program please help me with this def play_game (word_list): Allow the user to play an arbitrary number of hands. 1) Asks the user to
python program please help me with this
def play_game (word_list): "Allow the user to play an arbitrary number of hands. 1) Asks the user to input 'n' or 'r' or 'e' *If the user inputs'n', play a new (random) hand *If the user inputs 'r, play the last hand again *If the user inputs'e, exit the game. *If the user inputs anything else, ask them again 2) Ask the user to input a'u' or a 'c' If the user inputs 'u', let the user play the game as before using play_hand. * If the user inputs ' let the computer play the game using comp-play-hand (created above). If the user inputs anything else, ask them again 3) After the computer or user has played the hand, repeat from step 1 word_list: list (string) # TO DO # Build data structures used for entire session and play game if -name-- -main--': =- word_list-load_words ) play_game(word_list)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started