This is a simple, text-based Hangman game created as a project for my CodeAlpha Python Programming internship. The program randomly selects a word from a predefined list, and the player has 6 attempts to guess the word, one letter at a time.
The goal is to create a simple text-based Hangman game where the player guesses a word one letter at a time.
- A predefined list of 5 words for the game.
- The player is limited to 6 incorrect guesses.
- Simple and clear console-based input and output.
- Displays the current state of the word with underscores for unguessed letters.
- Tracks and displays letters that have already been guessed.
- Clone the repository:
git clone https://github.com/pareshjoshij/CodeAlpha_HangmanGame.git
- Navigate to the project directory:
cd CodeAlpha_HangmanGame
- Run the Python script:
python hangman.py
This project utilizes several core Python concepts as required by the task:
random
module for word selectionwhile
loops for game flowif-else
statements for game logicstring
manipulationlist
management for words and guessed letters