Menu

Project: Hangman

Introduction

Build a command-line Hangman game! This project combines string manipulation, file I/O (loading words from a file), and game logic.

Requirements

  1. Select a random word from a word list (you can create a text file with words).
  2. Display the word as underscores and reveal letters as they're guessed.
  3. Track incorrect guesses and display a hangman figure.
  4. Allow the player to guess letters or the full word.
  5. Implement save/load functionality using JSON or pickle so the game can be resumed.
  6. The game should end when the word is guessed or the hangman is complete.

Hints

  • Use random.choice() to pick a word.
  • Use a set to track guessed letters.
  • Use json module for save/load.

Support me!

I am a software engineer giving back to the community - my name is Musila Peter. Join me in empowering learners around the globe by supporting SaneGenius!