Skip to main content

A package to play a custom hangman game

Project description

Hangman Package

The Hangman package is a Python implementation of the classic game, Hangman. It allows users to play the game by guessing letters to complete a hidden word.

Installation

The package can be installed using pip:

pip install hangman-package

Usage

The package can be used in the following way:

from hangman import Hangman

# Create a new instance of Hangman
hangman = Hangman()

# Start the game
hangman.play()

You can pass a list of strings to utilize custom words:

from hangman import Hangman

words = ["banana", "orange", "apple", "grape", "strawberry", "lemon", "watermelon"]

# Create a new instance of Hangman with custom words
hangman = Hangman(words=words)

# Start the game
hangman.play()

When play() is called, the game will begin and the user will be prompted to guess letters to complete the hidden word. The game ends when the user either completes the word or runs out of guesses.

Contributing

Contributions to the Hangman package are welcome! If you encounter a bug or have a feature request, please open an issue on the GitHub repository.

If you would like to contribute to the package, please fork the repository and submit a pull request with your changes.

License

The Hangman package is open-source software licensed under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hangman-package-1.0.2.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

hangman_package-1.0.2-py3-none-any.whl (3.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page