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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file hangman-package-1.0.2.tar.gz
.
File metadata
- Download URL: hangman-package-1.0.2.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c083011408c017f228a3dd26749c2e912daae4253bec74ab2c145fa256ddc3a7 |
|
MD5 | 2c2002645e9b395073ae2f8fc6d79860 |
|
BLAKE2b-256 | ab8e3b56a0f3e337b339f8fe35cb1696718a7a2f89bb7d4ede0deb480f12c640 |
File details
Details for the file hangman_package-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: hangman_package-1.0.2-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8bb6d661fbcc31088824f2e191665a5ae236c10ffa9a4b11bbc8e131d8b06d2 |
|
MD5 | 2e7c2c21d45d3511fe31187d2083c75c |
|
BLAKE2b-256 | 96baf058114c4e21625c5a0a4a2a6744db67c03738d3aaa9c49efdb6c444e1c5 |