Welcome to hangman, a Python-based version of the classic word-guessing game.
Hangman is a word-guessing game where the player tries to guess a secret word by suggesting letters. This version of Hangman includes several enhancements and is implemented in Python.
- Randomly selects a secret word from a predefined list.
- Displays the current progress of the guessed word.
- Provides a total of
length of the word + 3
attempts. - Tracks and informs the player of previously guessed letters.
- Notifies the player of wins or losses.
- Ensure you have Python installed on your machine (Python 3.6 or higher).
- Clone the repository or download the
hangman.py
script.
-
Open your terminal or command prompt.
-
Navigate to the directory where the
hangman.py
file is located. -
Run the script using the following command:
python hangman.py
- The game randomly selects a secret word from a predefined list.
- The player is given
length of the word + 3
attempts to guess the word. - The player guesses one letter at a time.
- If the guessed letter is in the secret word, it will be revealed in its correct positions.
- If the guessed letter is not in the secret word, the number of attempts remaining will decrease.
- The game ends when the player either correctly guesses the word or runs out of attempts.
This project is licensed under the MIT License. See the LICENSE file for details.
Enjoy playing hangman and happy guessing!