Giter Site home page Giter Site logo

python-hangman's Introduction

Word Guessing Game

This simple Python application features a game where the user has to guess a word. The game is built around guessing the letters of a randomly selected word. The user is given 10 lives, and these lives decrease with incorrect guesses.

Usage

To start the game, navigate to the terminal or command prompt and run the following command:

python word_guess_game.py

When the game starts, the user is prompted to enter a name. After entering a valid name, the game begins, and the user is given 10 lives. The user tries to guess the letters of a randomly selected word. For each correct guess, the corresponding letter of the word is revealed. With each incorrect guess, the user loses a life.

Rules

The user's name should consist only of letters and must be at least 3 characters long. Word guesses can only be a single letter and cannot include spaces.

Example Gameplay

Please enter your name: John
Hello John, Let's start the game
You have 10 lives
-
-
-
-
-
-
Enter your guess: a
You have left 9

-
-
-
-
-
-
Enter your guess: e
e
-
-
-
e
-
Enter your guess: k
e
-
-
k
e
-
Enter your guess: l
e
l
l
k
e
-
Enter your guess: o
e
l
l
k
e
o
!!! Congratulations John, You won !!!

Requirements

Python 3.x

Notes

Enjoy playing your game! You can customize the game by adding more words or modifying the code, such as updating the words list. To exit the game, you can use the Ctrl+C combination.

python-hangman's People

Contributors

emredinleyici 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.