Project Description
Your project for today is to build a basic version of the classic Hangman game in Python.
The program will choose a single secret word (hardcoded for now), and let the user guess one letter at a time. After each guess, it will show the user their progress by revealing correctly guessed letters and keeping underscores (_
) for letters they haven’t guessed yet.
The user will have a limited number of incorrect guesses (like 6 tries). If they guess all the letters before running out of tries, they win. Otherwise, they lose and the word is revealed.
This is a perfect beginner project to learn about:
Loops and conditionals
Keeping track of state with lists (letters guessed so far)
String building (showing progress with underscores)
Plus it’s a fun game you can expand later by choosing words randomly from a list or even drawing ASCII hangman graphics.
Expected Output
If they win:
Or if they lose:
💡 Hint
Not sure how to start? Click the Show Hint button below to learn how to keep track of guessed letters and how to build the string that shows the user’s current progress.
📝 The hint will show how to use a for
loop and check if each letter is in the list of guesses.
𝌣 Solution
🔒 This solution is available to paid subscribers only.
✅ It includes a full working example with a while
loop, a list for guessed letters, and win/lose checks.
🚀 Want to keep leveling up?
Browse 300+ projects at dailypythonprojects.substack.com/archive and unlock all solutions by subscribing. Build real Python skills daily and transform how you learn — one project at a time.