MONTFORT SCHOOL
NAGPUR
ACADEMIC YEAR 2025-26
COMPUTER SCIENCE INVESTIGATORY
“QUIZ”
ROLL NO.
NAME :- ARNAV SONPIPARE
CLASS :- XII A
SUBJECT :- Computer Science
SUBJECT CODE :- 083
PROJECT GUIDE :- Mrs. Yogita Paul
This is to certify that
Miss/Master of class XII has successfully
completed the investigatory project titled
as
in the subject of Computer Science at
Montfort School, Nagpur during the academic
year 2025-26
The said work has been assessed and is found
to be up to standards envisaged for the level
of the course.
Mrs. Yogita Paul Bro. Jomon Joy
(Teacher In-Charge) (Principal)
(Montfort School, Nagpur)
I would like to express my heartfelt gratitude and appreciation to all these
who have supported me in the successful completion of my investigatory
project during this academic session.
First and foremost, I would like to thank our esteemed principal, Bro
Jomon Joy for providing me with the opportunity to undertake this
project. Your Encouragement, guidance, and unwavering support
throughout this endeavour have been invaluable.
I am also deeply indebted to my dedicated and knowledgeable
Computer Science teacher and project mentor [Link] Paul . Your
expertise patience, and enthusiasm in mentoring me have been
instrumental in shaping the direction and outcome of this project.
Your continuous feedback and insightful suggestions have pushed me
to explore new avenues and strive for excellence. Lastly, I would like
to extend my thanks to all the friends and classmates who provided
assistance and moral support throughout this journey.
I am deeply grateful to everyone mentioned above, as well as to all
others who have contributed in any way to the successful completion of
this investigatory project. Your support and belief in me have been
pivotal in transforming my aspirations into reality.
Thank you once again for being a part of my journey and for your
unwavering support.
[Link]
[Link] and Hardware requirements
[Link] of this project
[Link] Code in Python
[Link] Screen
[Link] tables
[Link]
[Link] Scopes
[Link]
• A quiz is an engaging and interactive activity designed to test
a person’s knowledge on various topics. It encourages quick
thinking, sharp memory, and healthy competition among
participants. Through a mix of interesting questions, logical
puzzles, and brain-teasing challenges, quizzes motivate
students to explore beyond textbooks and develop confidence
in their abilities. Overall, a quiz is a great way to learn,
participate, and challenge yourself while enjoying the spirit of
teamwork and curiosity.
• A Python-based Quiz Management System integrated with
MySQL for backend data storage. The main objective of this
program is to demonstrate how Python can be connected
with a database to create a functional, interactive application.
Through this project, a complete quiz platform was
developed that allows players to register, log in, play quizzes,
view scores, and allows administrators to manage questions.
• The program uses MySQL Connector to establish a connection
between Python and the MySQL database. When the
program starts, it automatically creates the required
database (QUIZ) and tables such as Sign In, Question, and
Score if they do not already exist. These tables store player
information, quiz questions, and scores respectively.
• Python's control structures, loops, functions, and SQL queries
are combined to handle different user actions. Players can
sign up, log in securely, answer random questions, and
receive immediate scoring feedback. The admin panel allows
the administrator to add new questions to the quiz database,
ensuring the quiz remains dynamic and expandable.
Randomization of questions is achieved using Python’s
random module. Print the result and update the database
with the quiz data. Ask the players if they want to play again
and break the loop if they say no; Close the database
connection.
• Overall, this showcases the practical usage of Python for
backend programming, database handling, and
userinteractive systems. It also highlights key concepts such
as data insertion, retrieval, updating, validation, and
implementing menu-driven programs.
Software Specifications: -
• Operating system: Windows 10/8/7
• Platform : Python IDLE 3.11.4
• Database : MySQL 8.0
• Languages :Python
Hardware Specifications: - •
Processor: Dual core or above
• Hard Disk: 40 GB
• RAM: 1024 MB
1. User-Friendly Interface
The program is menu-driven and easy to navigate, allowing
players to register, log in, and play the quiz without any difficulty.
2. Secure Login System
The use of passwords and roll numbers helps ensure that only
registered users can access the quiz and view their scores.
3. Database Integration
Using MySQL ensures reliable storage of player information,
quiz questions, and scores, preventing data loss even after
the program is closed.
4. Dynamic Question Management
The admin panel allows new questions to be added, making the
quiz expandable and updatable.
5. Randomized Questions
Each quiz session selects random questions, which increases
fairness and avoids repetition.
6. Automatic Score Calculation
The system evaluates answers instantly and updates the score
table without manual effort.
import [Link]
import random
#CONNECTION BETWEEN FRONT_END AND BACK_END
mycon=[Link](user='root',password='bhargavi1707.',host='localhost',charset='utf
8')
cursor=[Link]()
[Link]("create database if not exists QUIZ") [Link]("use
Quiz")
[Link]("create table if not exists SIGNIN(Player_Name char(14),Roll_No int(11) primary
key,Class int(4),Pwd int(20))") [Link]("create table if not exists Question(q_no
int(4),Question varchar(200) primary key,Option1 varchar(50),Option2 varchar(50),option3
varchar(52),Answer varchar(50))") [Link]("create table if not exists Score(Roll_No
int(11),Points int(11))") #[Link]("create table if not exists result(foreign
key(Question_no)references Q(Question_No),Question_no int(4) primary,Correct_Ans
int(4),percentage float(30)") f=0
while(True):
if f==0:
print("\t\t******* QUIZ COMPETETION**********")
print( "\t\t ____ ___ ___ ______ " )
print("\t\t | | | | | / ")
print("\t\t | | | | | / ")
print("\t\t | \| | | | / ") print("\t\t
| \| | | | / ")
print("\t\t |_____\ |_____| ___|___ /______ ")
print("")
"""MAIN MENU
FOR YOUR CHOICE"""
print("\t\t [Link] YOURSELF")
print("\t\t [Link] IN and PLAY QUIZ")
print("\t\t [Link]")
print("\t\t [Link]-LOGIN")
print("\t\t [Link] US")
print("\t\t [Link]")
ch=int(input("ENTER YOUR CHOICE :"))
#PROCEDURE FOR SIGN UP
if(ch==1):
print("\t\t\t ALL information prompted are mandatory to be filled")
pname=input("PLAYER-NAME:") roll=int(input("ID/ROLL-NO:"))
c=int(input("CLASS:"))
pwd=int(input("PASSWORD (IN NUMERIC):")) pwd1=int(input("RE-ENTER
PASSWORD :")) if pwd==pwd1: [Link]("insert into
SIGNIN(Player_Name,Class,Roll_No,Pwd)
values('{}',{},{},{})".format(pname,c,roll,pwd)) [Link]("insert into
Score(Roll_No,Points) values({},{})".format(roll,0)) else:
print("\t\t **Terminate Program!!! Again start and SIGN IN yourself**")
[Link]()
print("\t\t\t ***READY FOR LOGIN***")
#PROCEDURE FOR LOGIN
if(ch==2):
print("\t\t\t ****LOGIN and PLAY QUIZ****")
roll=int(input("ID/Roll NO:"))
pwd2=int(input("ENTER YOUR USER PASSWORD:"))
[Link]("select * from signin where roll_no={} and Pwd={}".format(roll,pwd2))
d=[Link]()
a=[Link]
#print(a)
if a>0:
s=int(input("How Many Question Do you want to Play:"))
i=0 c=0 x=0 l=[]
print("\t **************QUIZ*************\t")
while i<s:
[Link]("select * from Question ")
b=[Link]()
b=[Link]
x=[Link](1,b)
# print("list",l,x)
if x in l:
continue
else:
[Link](x)
[Link]("select question,Option1,Option2,option3,Answer from Question where
q_no={}".format(x))
d=[Link]()
print(d[0][0])
print(" ")
print("option a:",d[0][1])
print(" ")
print("option b:",d[0][2])
print(" ")
print("option c:",d[0][3])
print(" ")
ans=(input("ENTER YOUR ANSWER: "))
if ans==d[0][4]:
print("CONGRATULATION,YOUR ANSWER IS CORRECT")
#print(" ..|.. ")
c=c+1 else:
print("WRONG ANSWERE !!!!!")
print("")
print("CORRECT ANSWER IS" ,d[0][4])
print("")
print("BETTER LUCK FOR NEXT TIME")
i=i+1
print("")
print("You got",c,"POint out of",s)
[Link]("update Score set points={} where Roll_no={}".format(c,roll))
[Link]() else: break
print("")
print("\t\t\t PASSWORD IS INCOORECT")
#Player Score
if(ch==3):
print("\t\t\t &&&SCORE$$$")
print(" ")
roll=int(input("ID/Roll NO:"))
pwd2=int(input("Enter your USer Password:"))
[Link]("select * from Score where Roll_no={}".format(roll))
d=[Link]()
print("\t\t\t\t Total Score",d[1])
#INSERTING DATA BY ADMIN
if(ch==4):
print("\t\t\t Admin-LOGIN") ADMINId=int(input("ADMIN-
ID")) pname=input("PLAYER-NAME:")
PASS=int(input("PASSWORD"))
pname1="Nur"
PASS1=14 if
PASS==PASS1:
c=int(input("CLASS:")
)
#pwd=int(input("PASSWORD (IN NUMERIC):"))
#pwd1=int(input("RE-ENTER PASSWORD :"))
[Link]("select * from Question ")
[Link]() b=[Link]
#if b>0:
y=int(input("How Many Question Do you want to Add:"))
j=0 while j<y:
#qno=int(input("QUESTION NO:"))
quest=input("ENTER NEW QUESTION :")
op1=input("OPTION a:")
op2=input("OPTION b:")
op3=input("OPTION c:")
ans=input("Ans a,b,c:")
j=j+1
[Link]("insert into Question(q_no,Question,Option1,Option2,option3,Answer)
values({},'{}','{}','{}','{}','{}')".format(b+1,quest,op1,op2,op3,ans))
#[Link]("insert into Score(Roll_No,Points) values({},{})".format(roll,0))
b=b+1 [Link]() else:
print(end="Terminate Program, WRONG PASSWORD!!! ")
#DETAILS
if(ch==5): print( "
Year 2025")
print("IDEs : PYTHON 3.11.4 , MYSQL 8.0")
print("CLASS-12 SCIENCE")
if(ch==6):
break
Python 3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)] on win32 Type
"help", "copyright", "credits" or "license()" for more information.
= RESTART: C:/Users/USER/AppData/Local/Programs/Python/Python311/[Link]
******* QUIZ COMPETETION*****
____ ___ ___ ______
| | | | | /
| | | | | /
| \| | | | /
| \| | | | /
|_____\ |_____| ___|___ /______
[Link] YOURSELF
[Link] IN and PLAY QUIZ
[Link]
[Link]-LOGIN
[Link] US
[Link]
ENTER YOUR CHOICE :1
ALL information prompted are mandatory to be filled
PLAYER-NAME:Bhargavi K
ID/ROLL-NO:17
CLASS:12
PASSWORD (IN NUMERIC):12345
RE-ENTER PASSWORD :12345
***READY FOR LOGIN***
******* QUIZ COMPETETION**********
____ ___ ___ ______
| | | | | /
| | | | | /
| \| | | | /
| \| | | | /
|_____\ |_____| ___|___ /______
[Link] YOURSELF
[Link] IN and PLAY QUIZ
[Link]
[Link]-LOGIN
[Link] US
[Link]
ENTER YOUR CHOICE :2
****LOGIN and PLAY QUIZ****
ID/Roll NO:17
ENTER YOUR USER PASSWORD:12345
How Many Question Do you want to Play:3
**************QUIZ*************
What is the Indian National currency?
option a: Yen
option b: Rupee
option c: Dollar
ENTER YOUR ANSWER: b
CONGRATULATION,YOUR ANSWER IS CORRECT
You got 1 POint out of 3
Which city is known as the "PINK CITY" of India?
option a: Nagpur
option b: Chennai
option c: Jaipur
ENTER YOUR ANSWER: a WRONG
ANSWERE !!!!!
CORRECT ANSWER IS c
BETTER LUCK FOR NEXT TIME
You got 1 POint out of 3
In which year India got Independence?
option a: 1990
option b: 1947
option c: 1890
ENTER YOUR ANSWER: b
CONGRATULATION,YOUR ANSWER IS CORRECT
You got 2 Point out of 3
******* QUIZ COMPETETION**********
____ ___ ___ ______
| | | | | /
| | | | | /
| \| | | | /
| \| | | | /
|_____\ |_____| ___|___ /______
[Link] YOURSELF
[Link] IN and PLAY QUIZ
[Link]
[Link]-LOGIN
[Link] US
[Link]
ENTER YOUR CHOICE :3
&&&SCORE$$$
ID/Roll NO:17
Enter your User Password:12345
Total Score 2
******* QUIZ COMPETETION**********
____ ___ ___ ______
| | | | | /
| | | | | /
| \| | | | /
| \| | | | /
|_____\ |_____| ___|___ /______
[Link] YOURSELF
[Link] IN and PLAY QUIZ
[Link]
[Link]-LOGIN
[Link] US
[Link]
ENTER YOUR CHOICE :4
Admin-LOGIN
ADMIN-ID1000
PLAYER-NAME:Admin
PASSWORD14
CLASS:12
How Many Question Do you want to Add:3
ENTER NEW QUESTION :In which year India got Independence?
OPTION a:1947
OPTION b:1919
OPTION c:1940
Ans a,b,c:a
ENTER NEW QUESTION :Which city is known as the "PINK CITY" of India?
OPTION a:Nagpur
OPTION b:Chennai
OPTION c:Jaipur
Ans a,b,c:c
ENTER NEW QUESTION :What is the Indian National currency?
OPTION a:Yen
OPTION b:Rupee
OPTION c:Dollar
Ans a,b,c:b
******* QUIZ COMPETETION**********
____ ___ ___ ______
| | | | | /
| | | | | /
| \| | | | /
| \| | | | /
|_____\ |_____| ___|___ /______
[Link] YOURSELF
[Link] IN and PLAY QUIZ
[Link]
[Link]-LOGIN
[Link] US
[Link]
ENTER YOUR CHOICE :5
Year 2025
IDEs : PYTHON 3.11.4 , MYSQL 8.0
CLASS-12 SCIENCE
******* QUIZ COMPETETION**********
____ ___ ___ ______
| | | | | /
| | | | | /
| \| | | | /
| \| | | | /
|_____\ |_____| ___|___ /______
[Link] YOURSELF
[Link] IN and PLAY QUIZ
[Link]
[Link]-LOGIN
[Link] US
[Link]
ENTER YOUR CHOICE :6
1. No Graphical User Interface (GUI)
The program runs in the console and lacks a modern visual
interface, which may reduce user engagement.
2. No Password Encryption
Passwords are stored as plain numbers, which is not secure
in a real-world application.
3. Limited Question Types
Only multiple-choice questions (MCQs) with three options
are supported. No true/false or descriptive questions.
4. No Timer Feature
There is no time limit for answering questions, which
reduces the competitive aspect.
5. Single Admin Access
The admin login is fixed in the program. There is no
separate admin table or multiple admin management.
6. Error Handling Is Minimal
If the user enters wrong data types or invalid inputs, the
program may stop.
1. Improvement of User Interface
In the future, the project can be further improved by adding a
more attractive and player-friendly interface.
2. Addition of More Questions
The question bank can be expanded to include more topics and
a larger number of questions for better practice.
3. Automatic Result Analysis
The project can be enhanced to generate a detailed analysis
report showing strengths and weaknesses of the player.
4. Integration with Online Platforms
The quiz can be linked with an online website so that player can
attempt the quiz from home as well.
5. Use of Graphics and Sounds
Features like sound effects and animated screens can be added
in future versions to make the quiz more interactive.
6. Multi-User Support
The project can be extended to allow multiple players and admins
to use the system with different access levels.
• Computer Science with Sumita Arora
• [Link]
• Under the guidance of subject
teacher -Mrs. Yogita
Paul