mgia / hangman

Designing Python curriculum for High School Students

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hangman

Who doesn't love Hangman? (Well, except the hanging man himself!)

Overview

I built this project to supplement a course curriculum for HackHighSchool prepared by @KaiDrumm. For educational purposes, code is written in long but simpler form and commented generously to assist students.

The program:

  • Reads from an input file and populates its word bank as a dictionary (a.k.a. hashtable)
  • Chooses a random word, based on word length specified
  • Runs a play loop, displaying current state
  • If the player runs out of lives, game is over
  • If all blanks are filled, player wins!

Run

Populate the input file with words to choose from.
Next, run this command:

python main.py

About

Designing Python curriculum for High School Students


Languages

Language:Python 100.0%