This is a Flask-based quiz application that allows users to test their knowledge with predefined questions. The project uses SQLite for data storage and Bootstrap for styling.
- Web-based quiz system using Flask
- Stores questions and answers in an SQLite database
- Option to add, delete, and modify questions
- Predefined questions can be imported from a CSV file
- Results tracking to monitor performance
- Responsive design using Bootstrap
You can get the project in two ways:
git clone https://github.com/Pythonamy/thepythonquiz.git
cd thepythonquiz1. Go to: https://github.com/Pythonamy/thepythonquiz
2. Click **"Code" → "Download ZIP"**.
3. Extract the ZIP file to your preferred location.
4. Open the project folder in your IDE (e.g., VS Code, PyCharm).Ensure you have Python installed, then run:
pip install -r requirements.txtRun the following command to create the database and tables:
python database.pyTo load predefined questions from questions.csv, run:
python import_questions.pyStart the Flask application with:
python app.pyThen open http://127.0.0.1:5000/ in your browser.
- Click on "Add a Question" in the menu.
- Enter the question, answer, and optional category.
- Submit the form to save the question.
- Click on "Delete a Question" in the menu.
- Select a question from the dropdown list.
- Click "Delete" to remove the question from the database.
- Click "Start Quiz" to begin.
- Answer the displayed question and submit your response.
- The system will check your answer and display the result.
- You can continue answering more questions or return to the main menu.
- Click "View Analytics" to see statistics on total attempts, correct answers, and overall success rate.
This project is open-source and can be modified or distributed as needed.