Start building now
Choose how you want to begin this project.
Open it privately for practice or create a shared workspace to build it together.
No setup required • Guided steps inside the editor
Private practice
Open a private editor and work through the steps at your own pace.
Start project aloneShared workspace
Create a live session so you can teach, pair, or build the project together.
What you'll build
A word guessing game where the player keeps guessing letters until they reveal the word or run out of attempts.
What you'll learn
- How to work with letters in strings
- How to keep track of guessed letters
- How to use loops for repeated guesses
- How to build a more structured text-based game
How it works
The program chooses a word for the player to guess.
The player enters one letter at a time.
Correct guesses reveal letters in the word.
The game ends when the word is complete or the player runs out of attempts.
Build path
These steps appear inside the editor so you can build one part at a time.
- 1
Step 1
Ask for a letter
Use input() to let the player guess a single letter.
- 2
Step 2
Store guessed letters
Add each guess to the guessed_letters list so the game remembers what has been tried.
- 3
Step 3
Show progress
Display the word with guessed letters revealed and unknown letters shown as underscores.
- 4
Step 4
Handle wrong guesses
If the guessed letter is not in the word, reduce attempts_left by 1.
- 5
Step 5
End the game correctly
Keep looping until the player has guessed every letter or runs out of attempts.
More to explore
Want a different challenge?
Browse more guided projects, or come back and start this one whenever you are ready.