Un module pour créer facilement un jeu de quiz
Project description
Quizen
🎉 Quizen is an interactive console application designed to simplify the creation of Quiz Games. With a well-structured dictionary, you can set up a quiz in just 3 lines of code!
🚀 Aimed at both beginners and advanced developers, Quizen offers an intuitive way to integrate educational and entertaining quizzes into your Python projects.
⚙️ Features
- 🧩 Customizable: Easily create questions and answers using dictionaries.
- 🎯 Engaging Gameplay: Automatic handling of scores, lives, and consecutive correct answers.
- 💾 Data Persistence: Player statistics are saved to a file for review.
- 🔀 Shuffling: Randomize questions and answers to keep things fresh.
📦 Installation
Install the latest version of Quizen from PyPI:
pip install quizen
🛠 How to Use
Using Quizen is as simple as this:
Step 1: Create your questions
Prepare your questions in a JSON file or Python dictionary. For example:
{
"What is the capital of France?": ["Paris", "London", "Berlin", "Madrid"],
"Who developed Python?": ["Guido van Rossum", "Dennis Ritchie", "James Gosling", "Bjarne Stroustrup"]
}
Step 2: Launch your quiz
Here's a complete example to start a quiz:
from quizen import Quiz
from json import load
path = "data/questions.json"
with open(path, "r", encoding="utf-8") as file:
questions = load(file)
Quiz(questions, player="John").play()
📊 Statistics
At the end of each game, Quizen displays and saves player statistics, including:
- Questions answered
- Correct answers
- Wrong answers
- Score
- Longest streak of correct answers
- Remaining lives
🛡 Dependencies
Quizen depends on the following libraries:
- rich: For beautiful console output.
Install all dependencies automatically with:
pip install quizen
🏆 Contributing
We welcome contributions! Here's how you can help:
- Report bugs: Found a bug? Let us know by opening an issue.
- Suggest improvements: Have ideas for new features? Share them on GitHub.
- Submit pull requests: Fix a bug or implement a feature and submit your PR.
Start by cloning the repository:
git clone https://github.com/Tostenn/Quizen.git
cd quizen
📣 Get in Touch
Your feedback is invaluable! If you encounter issues, have suggestions, or want to contribute, feel free to:
- Open an issue on GitHub.
- Contact me directly through my GitHub profile.
Let’s make Quizen the ultimate tool for interactive quizzes!
Enjoy using Quizen and happy coding! 😊
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quizen-0.2.1.tar.gz.
File metadata
- Download URL: quizen-0.2.1.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ecc17fb7661dbcdba08504492894db0c5fa176f7321cca5d0c7dcde048c2aeb
|
|
| MD5 |
cb20343f40065ef45c41717dc268bbae
|
|
| BLAKE2b-256 |
68b6a05ee343a1651757f69591851f704f58da4630db5f9f80388f31373a5289
|
File details
Details for the file quizen-0.2.1-py3-none-any.whl.
File metadata
- Download URL: quizen-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75d1335de64b874e46f16892906afb3aacc8c6b75346b16be1f423e9561b8feb
|
|
| MD5 |
b2895cb3c6103a54def432250c710e03
|
|
| BLAKE2b-256 |
d2e69d9fe64dc09521704e8eb89d4021916f603c2168531c76648ea04f0d8684
|