CS Poroj
CS Poroj
COMPUTER SCIENCE
By: Hariduthram.P.S
Class: XII
Roll no:
SSVM WORLD SCHOOL
Department of Computer Science
Bonafide Certificate
I hereby certify that this project entitled Quiz Application bonafide
work done by Hariduthram.P.S.
Register No: .
the names of those who helped to make it possible. I hereby take this
thanks to my
Mrs. Nimitha Pramod and Mrs. Radhika, the teachers of the Computer
science department, mainly Mr. Mujibullah and Mrs. Nirmala and who
gave me ample help and support to pursue and complete the project on this
topic.
Secondly I would like to thank CBSE for giving me such an opportunity without
which I would not have been able to do such a project. I would also like to thank
supportiveness that I could complete this venture within the limited time frame.
4 SYSTEM IMPLEMENTATION 14
6 SOURCE CODE 20
7 OUTPUTS 42
8 USER MANUAL 62
9 CONCLUSION 63
10 BIBLIOGRAPHY 64
INTRODUCTION:
This software, being simple in design and working, does not require much
training to users; it can be used as the right tool to check one’s eligibility in quiz
programs.
For the coding and design of the Project, Python IDLE, a powerful front-end
tool is used for getting Graphical User Interface (GUI) based integrated platform
and coding simplicity. MySQL, a powerful, open source RDBMS, is used as
back-end as per requirement and suitability of the CBSE curriculum of
Computer science course.
5
OBJECTIVE AND SCOPE OF THE PROJECT :
The objective of this project is to let the students apply the programming knowledge into a
real- world situation/problem and exposed the students how programming skills helps in
developing a good software.
Write programs utilizing modern software tools.
Apply object oriented programming principles effectively when developing
small to medium sized projects.
Write effective procedural code to solve small to medium sized problems.
Students will demonstrate a breadth of knowledge in computer science, as
exemplified in the areas of systems, theory and software development.
Students will demonstrate ability to conduct a research or applied Computer
Science project, writing and presentation skills which exemplify scholarly style in
computer science.
• Connect the quiz application to a MySQL database to store and retrieve data such as quiz
questions, answers, and scores. This could involve creating a database schema and writing SQL
queries to manipulate the data.
• Implement features such as displaying quiz questions and multiple choice answers, tracking
the user's progress through the quiz, and calculating the user's score at the end of the quiz.
• Allow the user to create and edit quiz questions and answers using the application, potentially
requiring additional GUI elements and functionality to manage the data.
• Implement security measures to protect the database and ensure data integrity, such as using
prepared statements and sanitizing user input.
• Test and debug the application to ensure it is functioning correctly and meets the desired
specifications.
6
THEORETICAL BACKGROUND
What is Database?
Database is a systematic collection of data. It supports storage and manipulation of data,
makes data management easy.
What is RDBMS?
RDBMS stands for Relational Database Management System. RDBMS is the basis for
SQL, and for all modern database systems like MS SQL Server, IBM, DB2, Oracle,
MySQL and Microsoft Access.
What is a table?
The data in an RDBMS is stored in database objects which are called as tables. This
table is basically a collection of related data entries and it consists of numerous columns
and rows.
Example of a table:
7
ABOUT PYTHON IDLE
Python is a high-level, interpreted and general purpose dynamic
programming language that focuses on code readability.
8
Python has topped the charts in the recent years over other programming
languages like C, C++ and Java and is widely used by the programmers.
The language has undergone a drastic change since its release 25 years ago
as many add-on features are introduced. The Python 1.0 had the module
system of Modula-3 and interacted with Amoeba Operating System with
varied functioning tools.
Python 2.0 introduced in the year 2000 had features of garbage collector and
Unicode Support. Python 3.0 introduced in the year 2008 had a constructive
design that avoids duplicate modules and constructs.
With the added features, now the companies are using Python
3.5 and a few later releases.
• Interpreted
• Modular
• Dynamic
• Object-oriented
• Portable
• High level
9
Some of the advantages of python are:
• Extensive Support Libraries
• Integration Feature
• Run-time Errors
10
ABOUT TKINTER IN PYTHON
The Tkinter module (“Tk interface”) is the standard Python interface to the Tk GUI
toolkit from Scripts (formerly developed by Sun Labs).
Both Tk and Tkinter are available on most Unix platforms, as well as on Windows and
Macintosh systems. Starting with the 8.0 release, Tk offers native look and feel on
all platforms.
It is usually a shared library (or DLL), but might in some cases be statically linked with
the Python interpreter.
The public interface is provided through a number of Python modules. The most
important interface module is the Tkinter module itself.
“Import Tkinter”
The Tkinter module only exports widget classes and associated constants, so you can
safely use the from-in form in most cases. If you prefer not to, but still want to save
some typing, you can
Tkinter is the standard GUI library for Python. Python when combined with Tkinter
provides a fast and easy way to create GUI applications. Tkinter provides a
powerful object-oriented interface to the Tk GUI toolkit.
Creating a GUI application using Tkinter is an easy task. All you need to do
• Enter the main event loop to take action against each event triggered by the user.
11
ABOUT MYSQL
MySQL is an Oracle-backed open source relational database management system
(RDBMS) based on Structured Query Language (SQL). MySQL runs on virtually all
platforms, including Linux, UNIX, Windows and MAC.
MySQL is a fast, easy-to-use RDBMS being used for many small and big businesses.
MySQL is developed, marketed and supported by MySQL AB, which is a Swedish
company.
5. MySQL works very quickly and works well even with large data sets.
6. MySQL is very friendly to PHP, the most appreciated language for web
development. MySQL supports large databases, up to 50 million rows or more in a
table. The default file size limit for a table is 4GB, but you can increase this (if
your operating system can handle it) to a theoretical limit of 8 million terabytes
(TB).
12
MySQL in python can be used by:
1. Connecting to the database.
13
SYSTEM IMPLEMENTATION
THE HARDWARE USED:
PC with INTEL® CORE™ with installed RAM of 16GB
14
SYSTEM DESIGN & DEVELOPMENT
Table Design:
The database of Quiz application contains 9 tables. The
tables are to minimize the redundancies of data. The
tables and their structure are given below:
Table Descriptions:
15
Table Name: questions
16
Table Name: correct_answers
17
Table Name: user
18
Table Name: user_incorrect_answers
19
SOURCE CODE
#connect to mysql
mydb = mysql.connector.connect(
host="localhost",
user="root",
passwd="root",
database="quiz"
)
mycursor = mydb.cursor()
def add_defaultques() :
#questions in database
#1
mycursor.execute("INSERT IGNORE INTO questions values
(NULL,'What is the other name of Salt Lake Stadium ?')")
mycursor.execute("INSERT IGNORE INTO answers
values(NULL,'[A] Yuba Bharti Stadium','[B] Bharat Bharti
Stadium','[C] Eden Gardens','[D] Kolkata Stadium')")
mycursor.execute("INSERT IGNORE INTO correct_answers
values (NULL,'[A] Yuba Bharti Stadium')")
mycursor.execute("INSERT IGNORE INTO score
values(NULL,1)")
#2
mycursor.execute("INSERT IGNORE INTO questions values
(NULL,'Who among the following is first Indian to win an individual
gold medal at any Olympic Games?')")
mycursor.execute("INSERT IGNORE INTO answers values
(NULL,'[A] Abhinav Bindran','[B] Muhammad Aslam','[C]
21
Rajyavardhan Singh Rathode','[D] Mohammed Shahid')")
mycursor.execute("INSERT IGNORE INTO correct_answers
values(NULL,'[A] Abhinav Bindran')")
mycursor.execute("INSERT IGNORE INTO score
values(NULL,1)")
#3
mycursor.execute("INSERT IGNORE INTO questions
values(NULL,'Who has designed the trophy of FIFA Womens World
Cup?')")
mycursor.execute("INSERT IGNORE INTO answers
values(NULL,'[A] William Sawaya','[B] Formiga','[C] Marta','[D]
Sun Wen')")
mycursor.execute("INSERT IGNORE INTO correct_answers
values(NULL,'[A] William Sawaya')")
mycursor.execute("INSERT IGNORE INTO score
values(NULL,1)")
#4
mycursor.execute("INSERT IGNORE INTO questions
values(NULL,'Which of the following is awarded to individuals for
promoting education, culture, development and peace through
sport?')")
mycursor.execute("INSERT IGNORE INTO answers values
(NULL,'[A] Olympic Cup','[B] Olympic Laurel','[C] Olympic
Town','[D] Olympic Order')")
mycursor.execute("INSERT IGNORE INTO correct_answers
values(NULL,'[B] Olympic Laurel')")
mycursor.execute("INSERT IGNORE INTO score values
(NULL,1)")
#5
mycursor.execute("INSERT IGNORE INTO questions
values(NULL,'How far is the service line from the net in tennis?')")
mycursor.execute("INSERT IGNORE INTO answers
22
values(NULL,'[A] 25 feet','[B] 21 feet','[C] 20 feet','[D] 19 feet')")
mycursor.execute("INSERT IGNORE INTO correct_answers
values(NULL,'[B] 21 feet')")
mycursor.execute("INSERT IGNORE INTO score
values(NULL,1)")
#6
mycursor.execute("INSERT IGNORE INTO questions
values(NULL,'Where were the Commonwealth Games 2018 held?')")
mycursor.execute("INSERT IGNORE INTO answers
values(NULL,'[A] New Delhi','[B] Auckland','[C] Gold Coast','[C]
Gold Coast')")
mycursor.execute("INSERT IGNORE INTO correct_answers
values(NULL,'[B] 21 feet')")
mycursor.execute("INSERT IGNORE INTO score
values(NULL,1)")
#7
mycursor.execute("INSERT IGNORE INTO questions
values(NULL,'How many bails are placed on three stumps on either
side of a cricket pitch?')")
mycursor.execute("INSERT IGNORE INTO answers
values(NULL,'[A] 2','[B] 3','[C] 4','[D] 1')")
mycursor.execute("INSERT IGNORE INTO correct_answers
values(NULL,'[A] 2')")
mycursor.execute("INSERT IGNORE INTO score
values(NULL,1)")
#8
mycursor.execute("INSERT IGNORE INTO questions
values(NULL,'What kind of racing event was supported by UCI
ProTour?')")
mycursor.execute("INSERT IGNORE INTO answers
values(NULL,'[A] Road racing','[B] Track racing','[C] Mountain
Biking','[D] BMX')")
23
mycursor.execute("INSERT IGNORE INTO correct_answers
values(NULL,'[A] Road racing')")
mycursor.execute("INSERT IGNORE INTO score
values(NULL,1)")
#9
mycursor.execute("INSERT IGNORE INTO questions values
(NULL,'Where was the first Cricket World Cup held and when?')")
mycursor.execute("INSERT IGNORE INTO answers values
(NULL,'[A] England, 1975','[B] England, 1979','[C] Australia,
1975','[D] Australia, 1979')")
mycursor.execute("INSERT IGNORE INTO correct_answers
values (NULL,'[A] England, 1975')")
mycursor.execute("INSERT IGNORE INTO score
values(NULL,1)")
#10
mycursor.execute("INSERT IGNORE INTO questions values
(NULL,'When did the World Shooting Championships begin?')")
mycursor.execute("INSERT IGNORE INTO answers values
(NULL,'[A] 1897','[B] 1907','[C] 1908','[D] 1915')")
mycursor.execute("INSERT IGNORE INTO correct_answers
values (NULL,'[A] 1897')")
mycursor.execute("INSERT IGNORE INTO score values
(NULL,1)")
mydb.commit()
#add_defaultques()
25
question_entry = tk.Entry(add_questions_window ,width=20,
font=("Arial", 14))
question_entry.grid(row=0, column=1)
answer1_label = tk.Label(add_questions_window, text="Answer
1",font=("Arial", 14),bg="grey",fg="white")
answer1_label.grid(row=1, column=0)
answer1_entry = tk.Entry(add_questions_window,width=20,
font=("Arial", 14))
answer1_entry.grid(row=1, column=1)
answer2_label = tk.Label(add_questions_window, text="Answer
2",font=("Arial", 14),bg="grey",fg="white")
answer2_label.grid(row=2, column=0)
answer2_entry = tk.Entry(add_questions_window,width=20,
font=("Arial", 14))
answer2_entry.grid(row=2, column=1)
answer3_label = tk.Label(add_questions_window, text="Answer
3",font=("Arial", 14),bg="grey",fg="white")
answer3_label.grid(row=3, column=0)
answer3_entry = tk.Entry(add_questions_window,width=20,
font=("Arial", 14))
answer3_entry.grid(row=3, column=1)
answer4_label = tk.Label(add_questions_window, text="Answer
4",font=("Arial", 14),bg="grey",fg="white")
answer4_label.grid(row=4, column=0)
answer4_entry = tk.Entry(add_questions_window,width=20,
font=("Arial", 14))
answer4_entry.grid(row=4, column=1)
correct_answer_label = tk.Label(add_questions_window,
text="Correct Answer",font=("Arial", 14),bg="grey",fg="white")
correct_answer_label.grid(row=5, column=0)
correct_answer_entry =
tk.Entry(add_questions_window,width=20, font=("Arial", 14))
correct_answer_entry.grid(row=5, column=1)
score_label = tk.Label(add_questions_window,
text="Score",font=("Arial", 14),bg="grey",fg="white")
26
score_label.grid(row=6, column=0)
score_entry = tk.Entry(add_questions_window,width=20,
font=("Arial", 14))
score_entry.grid(row=6, column=1)
submit_button = tk.Button(add_questions_window,
text="Submit",bg="green", fg="white",
command=submit,font=("Arial", 14))
submit_button.grid(row=7, column=0)
add_questions_window.mainloop()
adminMenu()
add_user_incorrect_answers_window.configure(background="cadetb
lue4")
x = mycursor.fetchall()
frame4=Frame(add_user_incorrect_answers_window,height=700,wid
th=1000,bg='cadetblue4')
frame4.place(x=0,y=0)
listBox=Text(frame4,height = 38, width =
75,fg="white",bg="cadetblue4",font="Helvetica")
listBox.grid(row = 2,column= 0, columnspan = 2)
listBox.insert(END, " \t\t\t Display Total scores\t\n\n")
listBox.insert(END,"
----------------------------------------------------------------------------\n\n")
listBox.insert(END,"\tID \t\t Total score \t\t\n\n")
listBox.insert(END,"
---------------------------------------------------------------------------\n\n")
S=0
for i in x:
listBox.insert(END,"\t")
listBox.insert(END, i[0])
listBox.insert(END,"\t\t")
listBox.insert(END, i[1])
28
listBox.insert(END,"\t\t")
listBox.insert(END,"\n\n")
listBox.insert(END,"
----------------------------------------------------------------------------\n\n")
add_user_incorrect_answers_window.configure(background="cadetb
lue4")
x = mycursor.fetchall()
frame4=Frame(add_user_incorrect_answers_window,height=700,wid
th=1000,bg='cadetblue4')
frame4.place(x=0,y=0)
listBox=Text(frame4,height = 38, width =
75,fg="white",bg="cadetblue4",font="Helvetica")
listBox.grid(row = 2,column= 0, columnspan = 2)
listBox.insert(END, " \t\t\t Display incorrect Answers\t\n\n")
listBox.insert(END,"
----------------------------------------------------------------------------\n\n")
listBox.insert(END,"\tID \t\t No of incorrect Answers \t\t\n\n")
listBox.insert(END,"
---------------------------------------------------------------------------\n\n")
S=0
for i in x:
29
listBox.insert(END,"\t")
listBox.insert(END, i[0])
listBox.insert(END,"\t\t")
listBox.insert(END, i[1])
listBox.insert(END,"\t\t")
listBox.insert(END,"\n\n")
listBox.insert(END,"
----------------------------------------------------------------------------\n\n")
add_user_correct_answers_window.configure(background="cadetblu
e4")
x = mycursor.fetchall()
frame4=Frame(add_user_correct_answers_window,height=700,width
=1000,bg='cadetblue4')
frame4.place(x=0,y=0)
listBox=Text(frame4,height = 38, width =
75,fg="white",bg="cadetblue4",font="Helvetica")
listBox.grid(row = 2,column= 0, columnspan = 2)
listBox.insert(END, " \t\t\t Display correct Answers\t\n\n")
listBox.insert(END,"
----------------------------------------------------------------------------\n\n")
listBox.insert(END,"\tID \t\t No of correct Answers \t\t\n\n")
30
listBox.insert(END,"
---------------------------------------------------------------------------\n\n")
S=0
for i in x:
listBox.insert(END,"\t")
listBox.insert(END, i[0])
listBox.insert(END,"\t\t")
listBox.insert(END, i[1])
listBox.insert(END,"\t\t")
listBox.insert(END,"\n\n")
listBox.insert(END,"
----------------------------------------------------------------------------\n\n")
frame4=Frame(leaderboard_window,height=700,width=1000,bg='ca
detblue4')
frame4.place(x=0,y=0)
listBox=Text(frame4,height = 38, width =
75,fg="white",bg="cadetblue4",font="Helvetica")
listBox.grid(row = 2,column= 0, columnspan = 2)
listBox.insert(END, " \t\t\t LEADER BOARD\t\t\n\n")
listBox.insert(END,"
----------------------------------------------------------------------------\n\n")
31
listBox.insert(END,"\tID \t\t SCORE \t\n\n")
listBox.insert(END,"
---------------------------------------------------------------------------\n\n")
S=0
for i in x:
listBox.insert(END,"\t")
listBox.insert(END, i[0])
listBox.insert(END,"\t\t")
listBox.insert(END, i[1])
listBox.insert(END,"\t\t")
listBox.insert(END,"\n\n")
listBox.insert(END,"
----------------------------------------------------------------------------\n\n")
leaderboard_window.mainloop()
delete_questions_window = tk.Tk()
delete_questions_window.title("Delete Question")
32
delete_questions_window.geometry("400x400")
delete_questions_window.configure(background="light salmon")
question_label = tk.Label(delete_questions_window,
text="QUESTION ID",font=("Arial", 14),bg="grey",fg="white")
question_label.grid(row=0, column=0)
question_entry = tk.Entry(delete_questions_window,width=20,
font=("Arial", 14))
question_entry.grid(row=0, column=1)
submit_button = tk.Button(delete_questions_window,
text="Submit",bg="green", fg="white",
command=submit,font=("Arial", 14))
submit_button.grid(row=1, column=0)
show_questions()
delete_questions_window.mainloop()
adminMenu()
def gam(r):
33
def gsub(r,i):
mycursor.execute("select * from user where user='{}'
".format(i))
d=mycursor.fetchall()
if d !=[]:
messagebox.showinfo(" Let's Play "," user "+str(d[0][1]))
id=d[0][0]
game(r,id)
r.destroy()
gw = tk.Tk()
gw.title("Game")
gw.geometry("500x500")
gw.configure(background="honeydew3")
g_label = tk.Label(gw, text="USER ID " ,font=("Arial",
20),bg="grey",fg="white")
g_label.grid(row=0,column=0)
nE = Entry(gw, width=20,font=("Arial", 20))
nE.grid(row=0, column=200)
answer_label3 = tk.Button(gw, text="SUBMIT", font=("Arial",
20), command=lambda:gsub(gw,nE.get()),bg="green",fg="white")
answer_label3.place(x=0, y=100)
gw.mainloop()
ws=0
cs=0
score = 0
def game(r,id):
r.destroy()
global score
34
def submit(ans,crt,g,s,i):
global score
global ws,cs
s=s-1
if ans == crt:
messagebox.showinfo("Success", "Correct")
score+=1
cs+=1
if s==i:
messagebox.showinfo("Score", "Your score is
"+str(score),)
mycursor.execute("insert into user_correct_answers
values('{}',{})".format(id,cs))
mycursor.execute("insert into user_incorrect_answers
values('{}',{})".format(id,ws))
mycursor.execute("insert into user_total_score values('{}',
{})".format(id,score))
mydb.commit()
g.destroy()
ws=0
cs=0
score=0
MainMenu()
g.destroy()
else:
messagebox.showinfo("Error", "Incorrect")
ws+=1
if s==i:
messagebox.showinfo("Score", "Your score is
35
"+str(score),)
mycursor.execute("insert into user_correct_answers
values('{}',{})".format(id,cs))
mycursor.execute("insert into user_incorrect_answers
values('{}',{})".format(id,ws))
mycursor.execute("insert into user_total_score values('{}',
{})".format(id,score))
mydb.commit()
g.destroy()
ws=0
cs=0
score=0
MainMenu()
g.destroy()
def adminSignup():
tk1 = tk.Tk()
tk1.resizable(False, False)
tk1.geometry("900x700")
tk1.title("ADMIN SIGNUP")
tk1.configure(background="pale goldenrod")
def adminLogin():
def submit(name,Id):
mycursor.execute("select * from admin where name = %s and id
= %s", (name,Id))
38
admin = mycursor.fetchall()
if admin:
tk.messagebox.showinfo("Admin Login", "Login successful")
tk2.destroy()
adminMenu()
else:
tk.messagebox.showinfo("Admin Login", "Login failed")
tk2 = tk.Tk()
tk2.title("ADMIN LOGIN")
tk2.geometry("900x700")
name = tk.StringVar()
tk2.configure(background="light salmon")
Id = tk.StringVar()
name_label = tk.Label(tk2, text="Name", font=("bold",
20),bg="grey",fg="white")
name_label.place(x=20, y=20)
name_entry = tk.Entry(tk2, textvariable=name,width=20,
font=("Arial", 20))
name_entry.place(x=150, y=20)
Id_label = tk.Label(tk2, text="ID", font=("bold",
20),bg="grey",fg="white")
Id_label.place(x=20, y=70)
Id_entry = tk.Entry(tk2, textvariable=Id,width=20, font=("Arial",
20))
Id_entry.place(x=150, y=70)
submit_button = tk.Button(tk2, text="Submit",
width=20,font=("Arial", 20), bg="green", fg="white",
command=lambda:submit(name_entry.get(), Id_entry.get()))
submit_button.place(x=150, y=110)
tk.mainloop()
39
def adminMenu():
tk3= tk.Tk()
tk3.title("ADMIN MENU")
tk3.geometry("900x700")
tk3.configure(background="cadet blue")
add_button1 = tk.Button(tk3, text="ADD QUESTIONS",
width=35, bg="orange", fg="black",
command=lambda:add_questions(),font=("Arial", 20))
add_button1.place(x=150, y=20)
view_button2 = tk.Button(tk3, text="DELETE QUESTIONS",
width=35, bg="orange", fg="black",
command=lambda:delete_questions(),font=("Arial", 20))
view_button2.place(x=150, y=70)
view_button3 = tk.Button(tk3, text="ADD USER", width=35,
bg="orange", fg="black",
command=lambda:add_users(),font=("Arial", 20))
view_button3.place(x=150, y=120)
view_button4 = tk.Button(tk3, text="DISPLAY USER CORRECT
ANSWER", width=35, bg="orange", fg="black",
command=lambda:add_user_correct_answers(),font=("Arial", 20))
view_button4.place(x=150, y=170)
view_button5 = tk.Button(tk3, text="DISPLAY USER
INCORRECT ANSWER", width=35, bg="orange", fg="black",
command=lambda:add_user_incorrect_answers(),font=("Arial", 20))
view_button5.place(x=150, y=220)
view_button6 = tk.Button(tk3, text=" DISPLAYS TOTAL SCORE
OF USER", width=35, bg="orange", fg="black",
command=lambda:add_user_total_score(),font=("Arial", 20))
view_button6.place(x=150, y=270)
tk.mainloop()
#function to exit
def quit(r):
40
r.destroy()
def MainMenu():
tk4= tk.Tk()
tk4.title("QUIZ")
tk4.geometry("900x700")
tk4.configure(background="medium aquamarine")
label1 = Label(tk4, text="Welcome to Quiz", font=("Arial", 20),
fg="black",bg="light cyan")
label1.place(x=150, y=20)
add_button1 = tk.Button(tk4, text="ADMIN SIGNUP", width=30,
bg="grey", fg="white",
command=lambda:adminSignup(),font=("Arial", 20))
add_button1.place(x=150, y=80)
view_button2 = tk.Button(tk4, text="ADMIN LOGIN", width=30,
bg="grey", fg="white",
command=lambda:adminLogin(),font=("Arial", 20))
view_button2.place(x=150, y=130)
view_button3 = tk.Button(tk4, text="PLAY QUIZ", width=30,
bg="grey", fg="white", command=lambda:gam(tk4),font=("Arial",
20))
view_button3.place(x=150, y=180)
view_button4 = tk.Button(tk4, text="VIEW LEADERBOARD",
width=30, bg="grey", fg="white",
command=lambda:leaderboard(),font=("Arial", 20))
view_button4.place(x=150, y=230)
view_button5 = tk.Button(tk4, text="EXIT", width=30, bg="grey",
fg="white", command=lambda:quit(tk4),font=("Arial", 20))
view_button5.place(x=150, y=280)
tk.mainloop()
MainMenu()
41
OUTPUTS
#Main page
42
#Sign Up Page:
43
#Login Page:
44
#Admin Menu;
45
#Adding Question:
46
#Deleting Question:
47
#Adding User:
User-1:
48
User-2:
49
#Display Correct Answers of User:
50
#Display Incorrect Answers of User:
51
#Display Total Score of User:
52
#Play Quiz:
User 1:
53
54
55
56
User 2:
57
58
59
60
#View Leader Board :
61
USER MANUAL
About the application:
1. Windows 7/10 OS
2. Python 3.7.3 and above
3. MySQL 8.0
What should be done and what can be done using this application:
The Quiz Application has both user and admin terminal. To create the
database and tables, the admin must run the python function “def
add_defaultques()” for once.
In admin terminal :
The admin first sign up and login from the main page, so that the admin
will have access to the special functions like add questions, delete
questions, adding user, displaying user correct answers, displaying user
incorrect answers and displaying total score of the user.
In user terminal:
The user can play the quiz application if the user id exists and set a new
high score. The user can also see the high score set by all the other
users.
62
CONCLUSION
63
BIBLIOGRAPHY
TEXT BOOKS:
COMPUTER SCIENCE with python XI-by SUMITA ARORA Published by
Dhanpat Rai and Sons.
COMPUTER SCIENCE with python XII-by SUMITA ARORA Published by
Dhanpat Rai and Sons.
WEB SITES:
https://www.tutorialspoint.com/python/python_gui_progr amming.html
https://www.geeksforgeeks.org/python-gui-tkinter
https://docs.python.org/3/library/tk.html
64