Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hangman Game (Python)

A simple text-based Hangman game built using Python as part of the CodeAlpha Python Programming Internship.

Project Description

This is a console-based Hangman game where the player tries to guess a randomly selected word one letter at a time. The player has a maximum of 6 incorrect guesses before the game ends.

The project demonstrates the use of fundamental Python concepts such as:

  • Random module
  • While loops
  • If-else statements
  • Lists
  • Strings
  • User input
  • Basic game logic

Features

  • Randomly selects a word from a predefined list
  • Reveals correctly guessed letters
  • Tracks incorrect guesses
  • Prevents duplicate guesses
  • Win/Lose conditions
  • Simple console interface

Technologies Used

  • Python 3

Project Structure

Hangman-Game/
│── hangman.py
└── README.md

▶ How to Run

  1. Clone this repository
git clone https://github.com/your-username/Hangman-Game.git
  1. Navigate to the project folder
cd Hangman-Game
  1. Run the program
python hangman.py

Screenshots

Game Start

Game Start

Winning the Game

Win


Concepts Practiced

  • Variables
  • Lists
  • Strings
  • Loops
  • Conditional Statements
  • Random Module
  • User Input
  • Basic Problem Solving

Learning Outcome

This project helped strengthen my understanding of Python fundamentals by building an interactive console game with user input, random word selection, and game logic.


Author

Kiran Sarwar

GitHub: https://github.com/Kiran-Sarwar

About

A command-line Hangman game built with Python featuring random word selection, input validation, and interactive gameplay.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages