Hangman

Hangman is a paper and pencil guessing game for two or more players. One player thinks of a word, phrase or sentence and the other tries to guess it by suggesting letters or numbers, within a certain number of guesses.

Coding Skills: Number, String, Tuple, Dictionary

How To Run The Program

For this game, you will need to copy 2 files. Make sure both files are saved in the same directory.

  1. Main Code
  2. Word List

When loading the main code, you will need two lines (fixed code and changed code):
For the fixed code, this should appear when the code is run.
This is 3 different tests: checking if the word list is accesible, ‘apple’ works with the code, and that all letters appear.

Loading word list from file...
   0 words loaded.
_pp_e
abcdfghjlmnoqtuvwxyz

For the changed code, you can input your chosen word by changing the word in the bracket.

hangman('You can put anything here')

This project was based on “Project Set 3” assignment in “MITx Python Course”

##

Enjoy!

Return To Main Page