Skip to content

Latest commit

 

History

History
 
 

hangman

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Terminal-games - Hangman

Description

This Hangman game is a simple implementation in Python where the player tries to guess a secret word by suggesting letters within a certain number of attempts. This is a classic word-guessing game that can be played in the terminal.

To compile and run

  • Clone the directory and cd into it.
  • To play Hangman:
    • cd into the hangman folder and run python3 hangman.py

How to play?

  1. The game will start by displaying a series of underscores representing each letter of the secret word. You need to guess the letters and try to complete the word before running out of attempts.

  2. Guess a letter by entering it through the terminal. If the letter is present in the word, it will be revealed in the appropriate position(s). If the letter is not in the word, you will lose one attempt.

  3. Keep guessing letters until you either guess the word correctly or run out of attempts. The game will let you know if you win or lose.

  4. After the game ends, you can choose to play again or exit the program.

Built with - Python 3