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

Get Invent Your Own Computer Games with Python , 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.