A Byte of Python

Introduction to the Hangman Gaming Room

Throughout this book, as and when we learn new concepts, we will learn to apply these concepts to eventually write a complete game in Python - everyone's favorite Hangman game.

The game is usually played by two players - one player has a word in mind and mentions the number of alphabets it contains. The other player has to guess the alphabets in the word. For every wrong guess, one mark is added or one part of the hangman figure is drawn. If the second player figures out the correct word before the hangman figure is complete (this is about 7 chances, usually), then he/she wins.

However, in our case, the role of the first player will be played by the computer.