Coder Social home page Coder Social logo

qmcq's Introduction

QMCQ - Quick MCQ Quiz

A simple MCQ (Multiple Choice Questions) quiz application powered by Python.

Overview

qmcq provides an interactive command-line interface to participate in multiple-choice quizzes. You supply a JSON file containing questions, options, and answers, and qmcq guides you through the quiz, shuffling questions and options for a unique experience every time.

Features

  • Randomization: Both questions and answer choices are shuffled to ensure a unique quiz-taking experience every time.
  • JSON Powered: Easy to supply quizzes in a readable and structured JSON format.
  • Validation: The application validates the structure of the JSON against a predefined schema to ensure quiz integrity.

Installation

To install qmcq, you can use pip:

pip install qmcq

Usage

After installation, you can run the quiz using:

qmcq path_to_your_quiz.json

Replace path_to_your_quiz.json with the path to your quiz file.

JSON Structure

A sample structure for the quiz JSON file:

{
  "questions": [
    {
      "question": "What is the capital of France?",
      "options": ["Berlin", "Madrid", "Rome", "Paris"],
      "answer": "Paris"
    },
    {
      "question": "Which is the largest mammal?",
      "options": ["Elephant", "Blue Whale", "Giraffe", "Polar Bear"],
      "answer": "Blue Whale"
    }
    // ... add more questions as needed
  ]
}

Contributing

We welcome contributions! Please fork the repository and open a pull request with your changes.

License

This project is licensed under the Apache-2.0 License.

qmcq's People

Watchers

Paul K. Korir avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.