knowledge hub
129
Practical Challenge - Hangman
Tutorial: Breakdown a game of hangman!
Introduction
Now that we know python basics, and how to use the module Turtle, let's put it all together and create a simple and interactive hangman game. In this game:
- The computer will randomly pick a word from a list
- A player will try to guess the secret word one letter at a time.
- A wrong guess makes the turtle draw a part of a stick figure.
- Too many wrong guesses, the turtle finishes the drawing and you lose.
- Guess the word before that happens, you win.
It may seem unnecessary to list out each step of the hangman game - everyone knows how to play hangman! But I promise, it definitely helps makes things ALOT simpler as we proceed.
Before we proceed, a quick knowledge check:
- Do we know what lists are and how to define them?
- Do we know what loops are and how do set them up?
- Do we know x and y coordinates and what they mean?
- Do we remember how to use turtle?
Once we're ready. Lets proceed!