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 alone

Shared 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

1

The program chooses a word for the player to guess.

2

The player enters one letter at a time.

3

Correct guesses reveal letters in the word.

4

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. 1

    Step 1

    Ask for a letter

    Use input() to let the player guess a single letter.

    Complete in the editorHint available
  2. 2

    Step 2

    Store guessed letters

    Add each guess to the guessed_letters list so the game remembers what has been tried.

    Complete in the editorHint available
  3. 3

    Step 3

    Show progress

    Display the word with guessed letters revealed and unknown letters shown as underscores.

    Complete in the editorHint available
  4. 4

    Step 4

    Handle wrong guesses

    If the guessed letter is not in the word, reduce attempts_left by 1.

    Complete in the editorHint available
  5. 5

    Step 5

    End the game correctly

    Keep looping until the player has guessed every letter or runs out of attempts.

    Complete in the editorHint available

More to explore

Browse more guided projects, or come back and start this one whenever you are ready.