Giter VIP home page Giter VIP logo

hangman's Introduction

hangman

Overview

Welcome to the Hangman Game, a Python script that brings the classic word-guessing game to life. This implementation challenges players to guess a hidden word one letter at a time, with only a limited number of attempts (lives) before facing the consequences. The game is designed for Python 3 and provides a fun way to test your vocabulary and deductive skills.

Getting Started

To play the Hangman Game, follow these simple steps:

  1. Prerequisites: Ensure you have Python 3 installed on your computer.

  2. Download: Download the hangman.py script to your local machine.

  3. Running the Game:

    • Open a terminal or command prompt.

    • Navigate to the directory where hangman.py is located.

    • Run the script with the following command:

      python hangman.py
      

Gameplay Rules

Here's how the game works:

  • When you start a new game, you'll see a word teaser, with each letter of the target word represented by an underscore.

  • You begin with 7 lives, and your goal is to guess the word correctly before running out of lives.

  • Input one letter at a time when prompted.

  • If your guess is correct, the corresponding letter will be revealed in the word teaser.

  • An incorrect guess results in the loss of a life, and you'll be informed of the remaining lives.

  • The game continues until you successfully guess the entire word or exhaust your lives.

  • To exit the game at any point, simply type 'exit'.

Example Gameplay

Here's an example of the Hangman Game in action:

New game started... your word is 7 characters long
To exit the game at any point, type 'exit'
_ _ _ _ _ _ _ 
Clue: A game played by gentlemen
Enter a letter: c
You are correct!
c _ _ _ _ _ _ 
Enter a letter: r
You are correct!
c r _ _ _ _ _ 
Enter a letter: i
You are correct!
c r i _ _ _ _ 
Enter a letter: o
You are correct!
c r i _ _ _ o 
Enter a letter: k
You are correct!
c r i _ _ _ o k 
Congratulations... you have won this round!

Author

This Hangman Game script is authored by Aditya Vijay. Enjoy the challenge!

License

This project is licensed under the MIT License. See the LICENSE file for complete details.

Have a great time playing Hangman!

hangman's People

Contributors

adityavijay21 avatar

Stargazers

kiriotheo? avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.