Python

Hangman Project

A fun project for beginner Python programmers to work on

Project Overview

The Hangman Project is a popular project for beginner programmers. The end product is fun to play with, and all you do is build your own hangman game with Python.

For the project, you’ll need to accept an input (single character) and check if it is in the name of the movie/game/series that is randomly selected from a list. The game should also display the blank spaces and filled in characters of the name between each character entry by the user. Lastly, you’ll need to keep track of the number of failed attempts by the player. If it surpasses a certain number, let’s say 7, then the game should stop.

Here’s an example of functionality:

_ _ _ _ 
_ 
Enter a Character: d   
Sorry! That character isn't in the name!
Strike # 1/7
Enter a Character: as
Enter a Character: a
This character is in the name!
_ a _ _ 
_ 
Enter a Character: e
Sorry! That character isn't in the name!
Strike # 2/7
Enter a Character: i
Sorry! That character isn't in the name!
Strike # 3/7
Enter a Character: o
Sorry! That character isn't in the name!
Strike # 4/7
Enter a Character: u
Sorry! That character isn't in the name!
Strike # 5/7
Enter a Character: d
Sorry! That character isn't in the name!
Strike # 6/7
Enter a Character: c
This character is in the name!
c a _ _ 
_ 
Enter a Character: r
This character is in the name!
c a r _ 
_ 
Enter a Character: s
This character is in the name!
c a r s 
_ 
Enter a Character: 3
This character is in the name!
c a r s 
3 
    
    
    
Congratulations! You've Won! The word was:
'cars 3'

End Product

You should think of this project as an opportunity to practice your skills with Python. However, feel free to take a look at our solution to the Hangman Project. It is pretty complex, so don’t worry if you don’t understand something. Just get in touch with us.

chevron_up