Hangman is a popular word-guessing game where one player thinks of a word and the other player tries to guess it by suggesting letters within a certain number of guesses. For each incorrect guess, a part of the hangman is drawn. The game continues until the word is guessed correctly or the hangman is complete.
main.py- Python script containing the implementation of the Hangman game.
- Download or clone the repository to your local machine.
- Make sure you have Python installed.
- Open a terminal or command prompt and navigate to the directory containing the files.
- Run the
main.pyscript using the commandpython main.py. - Follow the prompts on the screen to play the game.
- Guess letters one by one to uncover the hidden word.
- You have a limited number of guesses. Be careful not to use them all before guessing the word!
- When you run the script, you will be prompted with a message indicating the number of letters in the word to be guessed and the number of incorrect guesses allowed.
- You will see underscores representing each letter of the word to be guessed.
- Enter a letter and press enter to see if it is in the word.
- If the letter is correct, it will be revealed in the word.
- If the letter is incorrect, part of the hangman will be drawn.
- Continue guessing letters until you either guess the word correctly or run out of guesses.
- Contributions are welcome! If you have any suggestions or improvements for the game, feel free to fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
