We welcome volunteers to expand our question database! Follow this guide to add your own questions to the app, either by directly editing the questions.py
file or by uploading question papers for the community to parse.
The questions.py
file holds all the quiz questions in a structured format. Here's how you can add new questions:
-
Open the
questions.py
file located in the project root. -
Add your questions using the format below:
questions_list = [ Question("What is the capital of France?", ["London", "Berlin", "Paris", "Madrid"], "Paris", "Geography") ]
TO:
questions_list = [ Question("What is the capital of France?", ["London", "Berlin", "Paris", "Madrid"], "Paris", "Geography"), Question("Which planet is known as the Red Planet?", ["Venus", "Mars", "Jupiter", "Saturn"], "Mars", "Space") ]
-
Save the file and run the app to verify your questions (Don't forget to add a comma to the 2nd last Question in the list).
If you have a question paper in PDF format or other supported formats:
- Place the file in the
question_papers
folder. - Add a note in the README or create an issue in the repository to alert others about the upload.
- Optionally, use parsing tools or scripts to extract questions from the document into the
questions.py
format.
-
Structure Consistency: Ensure every question object has the keys
question
,options
, andanswer
.Question("Question goes here?", ["option1", "option2", "option3", "option4"], "correct Answer", "subject Name")
Example:
Question("What is the capital of France?", ["London", "Berlin", "Paris", "Madrid"], "Paris", "Geography")
-
Number of Options: Each question must have exactly four options. The correct answer should match one of the provided options.
-
Accuracy: Verify the correctness of each question and answer.
-
Language: Use simple, concise, and error-free English.
- Run the app using:
python main.py
- Start a quiz and ensure your questions appear correctly.
- Verify the app registers the correct and incorrect answers appropriately.
- Go to the
question_papers
folder in the repository. - Add your question paper file with a descriptive name (e.g.,
DCET_2023.pdf
). - Commit and push the file to the repository, or raise a pull request with your addition.
- Help parse uploaded question papers into structured questions.
- Suggest improvements to the app's question-handling logic.
- Collaborate with other volunteers in enhancing the app!
Check out the README for more information on contributing to this project.
Every question you add helps a student prepare better. Together, we can make DCET preparation accessible and effective for everyone. 🎉