A Python-based Exam Management System integrated with MySQL.
This project provides a complete workflow for student login, exam invigilation, grading, and admin-level question management.
- Secure login using stored credentials.
- Add new student information (
info()). - View all registered students (
studentlist()). - Attempt exams with multiple-choice questions fetched from the database.
- Automatic evaluation of answers with:
- Total Marks
- Correct/Incorrect Answers
- Grade Assignment (AβFail)
- Percentage Calculation
- Secure admin login.
- Manage exam questions:
- View all questions.
- Add new questions.
- Delete existing questions.
- Full control over the exam database.
-
Database Connection:
Usesmysql.connectorto connect withproject1database. -
Functions:
studentlist()β Displays all registered students.info()β Inserts new student details into the database.invigilator()β Conducts exam, tracks answers, calculates marks.grade()β Assigns grade based on marks.percentage()β Calculates percentage.admin_access()β Admin panel for managing questions.
-
Main Menu Options:
- Student login
- Admin login
- Add/view student information
- Exit
| Marks Range | Grade |
|---|---|
| β₯ 17 | A |
| 13β16 | B |
| 9β12 | C |
| 5β8 | D |
| < 5 | Fail |
- Language: Python
- Database: MySQL
- Connector:
mysql.connector
- Student/Admin selects login option.
- Credentials validated against database (
studentids/adminids). - Students attempt exam questions stored in
examtable. - System auto-calculates marks, grade, and percentage.
- Admins can add, view, or delete questions.
erDiagram
STUDENTIDS {
string username
string password
int studentid
}
ADMINIDS {
string username
string password
}
EXAM {
int id
string question
string optionA
string optionB
string optionC
string optionD
string answer
}
STUDENTIDS ||--o{ EXAM : "attempts"
ADMINIDS ||--o{ EXAM : "manages"