O'Reilly logo

Invent Your Own Computer Games with Python , 4th Edition by Al Sweigart

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

8WRITING THE HANGMAN CODE

image

This chapter’s game introduces many new concepts, but don’t worry: you’ll experiment with them in the interactive shell before actually programming the game. You’ll learn about methods, which are functions attached to values. You’ll also learn about a new data type called a list. Once you understand these concepts, it will be much easier to program Hangman.

Source Code for Hangman

This chapter’s game is a bit longer than the previous games, but much of it is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required