squaz


Namesquaz JSON
Version 0.1.2 PyPI version JSON
download
home_page
SummaryAn app to quiz the user on trivia
upload_time2023-11-23 15:18:42
maintainer
docs_urlNone
authorRobert Portelli
requires_python>=3.11,<4.0
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)

![GH Actions](https://github.com/robert-portelli/NewLibrary/actions/workflows/main.yaml/badge.svg)

![Black](https://img.shields.io/badge/code%20style-black-000000.svg)

![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)

# Quiz Game

A simple command-line quiz game.

This script reads questions from a TOML file, allows the user to choose a topic,
and quizzes the user with a set number of random questions from that topic.

## Requirements

- Python 3.7 or later
- The `tomllib` library for TOML parsing

Install `tomllib` with:

```bash
pip install toml
```

## Usage

1. Clone the repo
```bash
git clone https://github.com/robert-portelli/quiz
```

2. Navigate to the project directory
```
cd quiz
```

3. Run the quiz
```bash
python quiz.py
```

## How to Play
The script will prompt you to choose a topic from the available options.
You will then be asked a set number of random questions from the chosen topic.
Answer the questions as prompted.
Your performance will be displayed at the end of the quiz.

## Questions File
Questions are stored in a TOML file (QUESTIONS.toml). You can customize this file by adding your own questions and topics.

Example structure:
```toml
[topic_name]
label = "Topic Name"

[[topic_name.questions]]
questions = "What is the capital of France?",
answers = ["Paris"],
alternatives = ["London", "Berlin"],
explanation = "Paris is the capital of France."
```

## Contributing
Contributions are welcome! Feel free to open issues or submit pull requests.

## License

This project is licensed under the MIT License - see the [LICENSE](https://github.com/robert-portelli/quiz/blob/main/LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "squaz",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Robert Portelli",
    "author_email": "github@robertportelli.com",
    "download_url": "https://files.pythonhosted.org/packages/a8/31/507b0e7e9efa0ee6ea1a032aaef4fae76235d209d189d42242c8c6a03825/squaz-0.1.2.tar.gz",
    "platform": null,
    "description": "\n[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)\n\n![GH Actions](https://github.com/robert-portelli/NewLibrary/actions/workflows/main.yaml/badge.svg)\n\n![Black](https://img.shields.io/badge/code%20style-black-000000.svg)\n\n![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)\n\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)\n\n# Quiz Game\n\nA simple command-line quiz game.\n\nThis script reads questions from a TOML file, allows the user to choose a topic,\nand quizzes the user with a set number of random questions from that topic.\n\n## Requirements\n\n- Python 3.7 or later\n- The `tomllib` library for TOML parsing\n\nInstall `tomllib` with:\n\n```bash\npip install toml\n```\n\n## Usage\n\n1. Clone the repo\n```bash\ngit clone https://github.com/robert-portelli/quiz\n```\n\n2. Navigate to the project directory\n```\ncd quiz\n```\n\n3. Run the quiz\n```bash\npython quiz.py\n```\n\n## How to Play\nThe script will prompt you to choose a topic from the available options.\nYou will then be asked a set number of random questions from the chosen topic.\nAnswer the questions as prompted.\nYour performance will be displayed at the end of the quiz.\n\n## Questions File\nQuestions are stored in a TOML file (QUESTIONS.toml). You can customize this file by adding your own questions and topics.\n\nExample structure:\n```toml\n[topic_name]\nlabel = \"Topic Name\"\n\n[[topic_name.questions]]\nquestions = \"What is the capital of France?\",\nanswers = [\"Paris\"],\nalternatives = [\"London\", \"Berlin\"],\nexplanation = \"Paris is the capital of France.\"\n```\n\n## Contributing\nContributions are welcome! Feel free to open issues or submit pull requests.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](https://github.com/robert-portelli/quiz/blob/main/LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "An app to quiz the user on trivia",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "55406875a0936a6f4ed815bec70806f332cf175e691b3ead24fceecb28ba95e6",
                "md5": "6ba8cb0f688ec98de954a2e89331a8ff",
                "sha256": "76e94f4623ae418c2d050f888ff2a2a5a19942da619a8fe53ac3189cccb219cf"
            },
            "downloads": -1,
            "filename": "squaz-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6ba8cb0f688ec98de954a2e89331a8ff",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 9128,
            "upload_time": "2023-11-23T15:18:40",
            "upload_time_iso_8601": "2023-11-23T15:18:40.266516Z",
            "url": "https://files.pythonhosted.org/packages/55/40/6875a0936a6f4ed815bec70806f332cf175e691b3ead24fceecb28ba95e6/squaz-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a831507b0e7e9efa0ee6ea1a032aaef4fae76235d209d189d42242c8c6a03825",
                "md5": "65495b59852cfc818df7c43c8f1d5b9e",
                "sha256": "e9f3dc223d66f2746b94b6dfafcc15f4cc8216ad0b2ef59a8ba3c8a17c0e9872"
            },
            "downloads": -1,
            "filename": "squaz-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "65495b59852cfc818df7c43c8f1d5b9e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 7826,
            "upload_time": "2023-11-23T15:18:42",
            "upload_time_iso_8601": "2023-11-23T15:18:42.002951Z",
            "url": "https://files.pythonhosted.org/packages/a8/31/507b0e7e9efa0ee6ea1a032aaef4fae76235d209d189d42242c8c6a03825/squaz-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-23 15:18:42",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "squaz"
}
        
Elapsed time: 0.58455s