Hangman is a classic game in which a player thinks of a word and the other player tries to guess that word within a certain amount of attempts.
This is an implementation of the Hangman game, where the computer thinks of a word and the user tries to guess it.
The "Hangman" is a simple Python console game where the user is prompted to guess a letter, and the program checks if the guessed letter is in a randomly chosen secret word. The aim of the project is to demonstrate basic Python programming concepts such as loops, functions, and input validation.
To run the game, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/Juveanca13/hangman498.git
-
Navigate to the project directory:
cd hangman-game -
Run the game:
python hangman.py
- Upon running the game, you will be prompted to guess a letter.
- Enter a single character as your guess.
- The game will display the current state of the word with underscores for unguessed letters.
- Continue guessing until you either complete the word or run out of lives.
The project has the following structure:
hangman.py: The main Python script containing the Hangman class and game logic.
gitcore
README.md: Documentation file.
MIT License
Copyright (c) [2023] [Juveanca13]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.