This is a Quiz Application developed using Python 3.10 and MySQL server.
Author: @Shubhadip1004 (GitHub)
Description of Quiz Application:
- Basic Idea:
~ Developing MySQL databases
~ Implement Login System and Register System
~ Code to Implement the Quiz App by connecting the MySQL server
- Database Contents:
i. question: It contains Question_ID, Question, Options(1 to 4) and the Answer
ii. scoreboard: It contains Username(Primry Key) , Score_Achieved
iii. admin: It will contain the Questions submitted by user. Upon Acceptance, the questions will be transfered from Admin to Questions database.
iv. users: It Contains Username(Primary Key), Passcode
Initially, 20 questions will be present in the Questions Database among which randomly 15 will be asked.
- Python Code:
i. Connect the database
ii. Create a authentication system to allow different operations for both admin and user
ii.i. Separate login details by different users
ii.ii Register by the Approval of Admin
iii. Create the Quiz System
iv. Questions can be added on the system by the user upon approval by admin
Database Schema:
-
users{
username: varchar(35) Primary Key
passcode: varchar(35) Not Null
}
-
scoreboard{
username: varchar(35) Primary Key
score: integer Not Null
}
-
questions{
question_id: integer Primary Key
question: varchar(100) Not Null
option1: varchar(30) Not Null
option2: varchar(30) Not Null
option3: varchar(30) Not Null
option4: varchar(30) Not Null
answer: varchar(30) Not Null
}
-
admin_questions {
question_id: integer Primary Key
question: varchar(100) Not Null
option1: varchar(30) Not Null
option2: varchar(30) Not Null
option3: varchar(30) Not Null
option4: varchar(30) Not Null
answer: varchar(30) Not Null
}
How To Use:
- Run the "quiz_application_query.sql"
- Check whether all the required modules (mysql.connector, sys, time, random) are present or not.
- Run the Main function