Skip to main content

A python package for creating and taking quizzes.

Project description

dsci524_group13_quizit

Usage Development Release
Documentation Status codecov repostatus
Python 3.11 ci-cd PyPI Version

A python package for creating and taking quizzes.

Summary

Project Summary

This Python package is designed to help users to create custom build quizzes. The package allows users to load multiple-choice and/or short-answer question sets. It will then randomly select a user-defined number of questions from the question sets and generate a quiz. Quiz scores and time used will be displayed at the end of the quiz. Optionally, users can also have their quiz scores and incorrect and correct questions in a text file.

Package Functions

The package consists of three classes:

  1. Quizit —— The main class for creating and taking quizzes. This class has three methods:
  • load_questions —— Allows users to load in their own multiple-choice or short answer question sets

    load_questions(questions: pd.DataFrame = None, input_file: str = None, question_type: QuestionType = None, has_header: bool = True, delimiter: str = None)
    
  • take_multiple_choice —— Allows users to take a multiple-choice quiz with optional result tracking.

    take_multiple_choice(n, save_questions=False, save_score=False, file_path=False)
    
  • take_short_answer —— Allows users to take a short answer quiz with optional result tracking.

    take_short_answer(n, save_questions=False, save_score=False, file_path=False)
    
  1. QuestionType —— This class is used in load_questions to specify the type of quiz questions (multiple-choice or short-answer).

  2. QuizResult —— This class stores the quiz results returned by the take_multiple_choice and take_short_answer functions. It includes the score, time used, question summary and question type of the quiz.

Python Ecosystem Integration

dsci524_group13_quizit is a fantastic tool for both educators and learners, providing a seamless way to create and take quizzes. Unlike other Python packages such as quizzer and QuizzingPackage, this package stands out by supporting both multiple-choice and short answer formats. Additionally, it offers the unique feature of saving quiz results to a text file, making it an invaluable resource for tracking progress and performance. Whether you're teaching a class or studying for an exam, dsci524_group13_quizit is designed to make the quiz experience as smooth and effective as possible.

Installation

$ pip install dsci524_group13_quizit

Documentation

To learn more about interacting with this package visit the online documentation.

Usage

Below are outlined steps on how to interact with this package as a user. The tutorial assumes you are using Python and have already installed the package.

  1. Import the package and necessary modules:

    from dsci524_group13_quizit import Quizit, QuestionType
    
  2. Load your question sets: ensure the file paths exist

    mcq_file_path = "tests/test_data/multiple_choice.csv"
    shrtq_file_path = "tests/test_data/short_answer.csv"
    
    
    quiz = Quizit()
    mc_questions = quiz.load_questions(input_file=mcq_file_path, question_type=QuestionType.MULTIPLE_CHOICE, delimiter=";")
    shrt_questions = quiz.load_questions(input_file=shrtq_file_path, question_type=QuestionType.SHORT_ANSWER, delimiter=";")
    
  3. Take a multiple-choice quiz:

    quiz.take_multiple_choice(n=1)
    
  4. Take a short-answer quiz:

    quiz.take_short_answer(n=1)
    

These steps will guide you through the basic usage of the dsci524_group13_quizit package. For more detailed information, refer to the online documentation.

Contributors

Mavis Wong(@MavisWong295), Shangjia Yu(@shangjiayuu), Sopuruchi Chisom(@cs-uche)

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

dsci524_group13_quizit was created by Mavis Wong, Shengjia Yu, Sopuruchi Chisom. It is licensed under the terms of the GNU General Public License v3.0.

Credits

dsci524_group13_quizit was created with cookiecutter and the py-pkgs-cookiecutter template.

Changelog

All notable changes to this project will be documented in CHANGELOG.md.

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

dsci524_group13_quizit-0.0.1.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dsci524_group13_quizit-0.0.1-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file dsci524_group13_quizit-0.0.1.tar.gz.

File metadata

  • Download URL: dsci524_group13_quizit-0.0.1.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for dsci524_group13_quizit-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f76f71d4707f662070f15f7c079416b2050e1f211abe52bafd7f22021d064799
MD5 20d6a625fee74e2968d21682e8ed39b0
BLAKE2b-256 a0e5616ac7f421603a59a986df251b5791d1214852fbda261df4d58915172a49

See more details on using hashes here.

File details

Details for the file dsci524_group13_quizit-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dsci524_group13_quizit-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1cbc69fe402751a42ad6351e065884c58f2a182fdf77f111d020d2557c6128ab
MD5 431be0e7e9099ff3b58edf5c3acbccd6
BLAKE2b-256 0ed39f661ddbbb586e3e1fb445e61d01d858f53b94753dd0fac406058f03b525

See more details on using hashes here.

Supported by

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