A simple Python command-line Hangman game built for CodeAlpha – Python Programming Internship (Task 1).
Author: Adarsh Singh
Create a simple text-based Hangman game where the player guesses a word one letter at a time.
- The game randomly picks a word from a small predefined list of 5 words.
- The player guesses one letter at a time.
- Correct letters are revealed in the word; incorrect guesses count against a limit of 6.
- An ASCII art "hangman" gets drawn a bit more with each wrong guess.
- The game ends when the player either guesses the full word (win) or makes 6 wrong guesses (lose).
- After each game, the player can choose to play again.
randommodulewhileloopsif-elseconditionals- Strings
- Lists
- Make sure you have Python 3 installed.
- Download
hangman_game.pyfrom this repo. - Open a terminal in that folder and run:
python hangman_game.py - Type a single letter at each prompt to guess. Try to guess the word before you run out of guesses!
hangman_game.py– main program
Part of the CodeAlpha Python Programming internship – Module 1, Task 1. Created by Adarsh Singh