Skip to content

MacleansCollegeCodingClub2024/Beginners-Project-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Beginners-Project1

Term 4 Beginners Project 1

Hangman Game

Create a program that allows you to play hangman! Preferably, I’d like it to resemble an actual hangman game (with the lines representing letters and drawing the hangman himself).

Example with the word ‘code’ : (Input is in bold) This scenario is if the word was guessed in time:

"_ _ _ _"

Guess a letter: a

Nope

Letters guessed: a

Guess a letter: c

c _ _ _

Letters guessed: a

Guess a letter:g

Nope

Letters guessed: a g

Guess a letter: d

c _ d _

Letters guessed: a g

Guess a letter: o

c o d _

Letters guessed: a g

Guess a letter: e

You got it! The word was: code

This scenario is if the word wasn’t guessed in time: (After a few guesses) Nope He died rip :( The word was: code

Note: if the user enters a letter previously given, just tell them off:

E.g. the letter g was already given

Guess a letter: g

You already guessed that!

Guess a letter:

P.S. You can add the drawing if you’d like! Here’s an ascii art that you could use:

HMpics = ["  +---+\n  |   |\n      |\n      |\n      |\n      |\n=========", 

    "  +---+\n  |   |\n  O   |\n      |\n      |\n      |\n=========",

    "  +---+\n  |   |\n  O   |\n  |   |\n      |\n      |\n=========",

    "  +---+\n  |   |\n  O   |\n /|   |\n      |\n      |\n=========", 

    "  +---+\n  |   |\n  O   |\n /|\  |\n      |\n      |\n=========",

    "  +---+\n  |   |\n  O   |\n /|\  |\n /    |\n      |\n=========",

    "  +---+\n  |   |\n  O   |\n /|\  |\n / \  |\n      |\n========="]

It’s in a list format so keep that in mind!

About

Beginners Project 1: Hangman Game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published