Skip to content

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QP Lang (Question Paper Language)

QP Lang is a custom markup language designed to create structured, reusable, and machine-readable question papers.

This project includes a C++ parser that reads QP Lang files and generates a clean, formatted question paper.


Purpose:

Traditional question papers are written in Word/PDF formats:

  • No structure

  • Hard to reuse

  • Cannot automate

QP Lang solves this by introducing a structured format for writing questions, enabling:

  • Reusability

  • Automation

  • Easy parsing


Example Input (sample.qp)

\question{Define velocity}
\marks{2}
\format{theory}
\difficulty{easy}
\options{None}


\question{Find acceleration when u=0, v=20, t=4}
\marks{4}
\format{numerical}
\difficulty{medium}
\options{None}

\question{How many newtons laws are there? }
\marks{4}
\format{MCQ}
\difficulty{easy}
\options{
    A. One
    B. Two
    C. there
    D. No Laws
}
\answer{C}

Output:

Output.txt

----------------------------------------------
                Question Paper                
----------------------------------------------

Q1. Define velocity (2 marks)

Q2. Find acceleration when u=0, v=20, t=4 (4 marks)

Q3. How many newtons laws are there?  (4 marks)

ansKey.txt

----------------------------------------------
                  Answer Key                  
----------------------------------------------

Q3: C
Number of questions: 3 

Structure

QP_Lang/
│
├── main.cpp # C++ parser
├── sample.qp # Input file (QP Lang)
└── output.txt # Output file (Final Question paper)
└── ansKey.txt # Answers file (Final Anskey)
└── README.md # Documentation

How to Run

g++ main.cpp -o qp
./qp

Author

Suyash Sachin Barad
📍 Pune, Maharashtra, India
🔗 GitHub | LinkedIn | HackerRank


About

QP Lang is a custom markup language for designing structured question papers, along with a C++ parser that reads and processes the language to generate organized outputs.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages