Write a python program... Your hangman game should be broken into appropriate functions, contain a main function, and do the following: 1. The program should randomly select a word from the list: kangaroo, capybara, wombat, koala, wallaby, quokka, platypus, dingo, kookaburra 2. Repeatedly prompt the user to guess a letter. 3. Validate the input 4. All guessed letters should be stored in a two- dimensional list. If the number of times a letter has been guessed is greater than 1, then the user should be notified that they have already guessed this letter and prompted to guess a different letter. The hangman won’t update (grow) if the same incorrect letter is guessed multiple times. 5. The word should be printed where all correctly guessed letters are revealed, and all unguessed letters are replaced with underscores 6. A hangman reflecting the number of incorrect guesses should be printed 7. If all the letters in the word are guessed, then the user wins. If the hangman/number of incorrect guesses reaches 6, then the user loses   Modify your program so that the following functionality is added:   1. Instead of selecting the word from a hard-coded list, incorporate problem 2 so that the list is read from a file, then a word is randomly selected from this list. 2. when the game ends, the following information should be outputted to a new file: ● the word ● the state of the hangman ● if the user won or lost   Example outputs: quokka O \| | You won! kangaroo O \|/ | / \ You lost!

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Write a python program...
Your hangman game should be broken into appropriate functions, contain a main function, and do the following:
1. The program should randomly select a word from the list: kangaroo, capybara, wombat, koala, wallaby, quokka, platypus, dingo, kookaburra
2. Repeatedly prompt the user to guess a letter.
3. Validate the input
4. All guessed letters should be stored in a two- dimensional list. If the number of times a letter has been guessed is greater than 1, then the user should be notified that they have already guessed this letter and prompted to guess a different letter. The hangman won’t update (grow) if the same incorrect letter is guessed multiple times.
5. The word should be printed where all correctly guessed letters are revealed, and all unguessed letters are replaced with underscores
6. A hangman reflecting the number of incorrect guesses should be printed
7. If all the letters in the word are guessed, then the user wins. If the hangman/number of incorrect guesses reaches 6, then the user loses
 
Modify your program so that the following functionality is added:
 
1. Instead of selecting the word from a hard-coded list, incorporate problem 2 so that the list is read from a file, then a word is randomly selected from this list.
2. when the game ends, the following information should be outputted to a new file:
● the word
● the state of the hangman
● if the user won or lost
 
Example outputs:
quokka
O
\|
|
You won!
kangaroo
O
\|/
|
/ \
You lost!
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY