This Hangman game is a simple implementation in Python where the player tries to guess a secret word by suggesting letters within a certain number of attempts. This is a classic word-guessing game that can be played in the terminal.
- Clone the directory and
cd
into it. - To play Hangman:
cd
into the hangman folder and runpython3 hangman.py
-
The game will start by displaying a series of underscores representing each letter of the secret word. You need to guess the letters and try to complete the word before running out of attempts.
-
Guess a letter by entering it through the terminal. If the letter is present in the word, it will be revealed in the appropriate position(s). If the letter is not in the word, you will lose one attempt.
-
Keep guessing letters until you either guess the word correctly or run out of attempts. The game will let you know if you win or lose.
-
After the game ends, you can choose to play again or exit the program.