Kundan Kumar
Kundan Kumar
Quiz Competition’
AN PROJECT SUBMITTED
IN PARTIAL – FULFILMENT OF THE REQUIREMENT
FOR THE AWARD OF THE DEGREE
OF
BACHELOR OF SCIENCE
(COMPUTER APPLICATION)
BY
DEPARTMENT OF BCA
MARWARI COLLEGE
RANCHI -834001
(2020 - 2023)
ACKNOWLEDGEMENT
This thesis work has been an intellectually invigorating experience for me.
I am sure that the knowledge and experience gathered during the course
of this work will make me stand in good stead in future.
With immense pleasure and due respect I express my sincere gratitude to
In-charge, Marwari college Ranchi, for all his support and co-operation in
successfully completing this thesis work by providing excellent facilities.
Last, but not the last I am heartily thankful to almighty God for showering
his blessing forever during my entire life and also to my family members
for providing me a great support.
CERTIFICATE FOR PROJECT
This is to certify that this is a bona fide record of the project work entitled
“Artificial Intelligence Based Quiz Competition” done satisfactory at
“Marwari College Ranchi”
By
KUNDAN KUMAR (20MCRBS580045)
In partial fulfillment of BCA Examination.
This report or similar report on the topic has not been submitted for any other
examination and doesn’t form part of any other course undergone by the candidate.
We have not submitted the matter embodied in this dissertation for the award
Of any other degree.
CURRICULUM VITAE
Chapters in Books:
Coding And
Unit Testing
Integration And
System Testing
Maintenance
SYSTEM ANALYSIS
System analysis is the process of gathering and interpreting facts, diagnosing
problems and using the information to recommend improvements on the
system. System analysis is a problem solving activity that requires intensive
communication between the system users and system developers.
EXISTING SYSTEM
The current system for shopping is to visit the shop manually and from the
available product choose the item customer want and buying the item by
payment of the price of the item.
1. It is less user-friendly.
2. User must go to shop and select products.
3. It is difficult to identify the required product.
4. Description of the product limited.
5. It is a time consuming process
6. Not in reach of distant users.
PROPOSED SYSTEM
In the proposed system customer need not go to the shop for buying the
products. He can order the product he wish to buy through theapplication in
his Smartphone. The shop owner will be admin of the system. Shop owner
can appoint moderators who will help owner in managing the customers
and product orders. The system also recommends a home delivery system
for the purchased products.
SYSTEM REQUIREMENT SPECIFICATION
1. GENERAL DESCRIPTION
Product Description:
The system consists of two parts .A web application which can provide the
online shopping service and an android application for the customer
toaccess the web service from his Smartphone. Web application should be
able to help the customer for selecting his item and to help the owner in
managing the orders from the customers.
Problem Statement:
As online shopping became a trend nowadays the regular shops are losing
their customers to online brands. Customers have effortless shopping
experience and saving time through shopping online. For competing with
those online brands, If shops are providing an online portal where their
customers can shop through internet and get the products at their doors it
will increase the number of customers.
FEASIBILITY STUDY
WHAT IS FEASIBILITY STUDY?
The feasibility study involves the analysis of the problem and collection of all
relevant information relating to the product such as the different data items
which would be input to the system, the processing required to be carried
out on these data, the output data required to be produced by the system,
as well as various constraints on the behavior of the system
❖ Technical Feasibility
❖ Economic Feasibility
❖ Operational Feasibility
❖
TECHNICAL FEASIBILITY
In the feasibility study first step is that the organization or company has to
decide that what technologies are suitable to develop by considering
existing system. Here in this application used the technologies like PHP,
HTML, JAVA SCRIPT,CSSandMySQL
ECONOMICAL FEASIBILITY
TESTING
Testing is a process of executing a program with a intent of finding an error.
A good test case is one that has a high probability of finding an error that is
yet undiscovered. A successful test is one that uncovers a yet undiscovered
error. Testing cannot show the absence of defects, it can only show software
defects that are present.
A software strategy for software testing integrates software test case design
techniques into a well-planned series of steps that result in successful
construction of software.
There are four types of strategies:
Unit test:
Unit testing focuses on verification effort on the smallest unit of software
design module.
The test is always white box oriented, and the step can be conducted in
parallel for multiple modules.This testing is carried out during coding stage.
Integration test:
Integration testing is a systematic technique for construction of program
structure while the time of conducting tests to uncover errors associated
with interfacing. The objective is to take unit-tested modules and build a
program structure that has been dictated by the design
Validation test:
Validation testing is a final series of software testing. Validation testing
succeeds when the software function in a manner that can be reasonably
expected by the customer. Software validation is achieved through a series
of black box tests that demonstrate conformity with requirements.
System test:
After integration of all modules of the system it will give appropriate
information , expected to the user.
MAINTENANCE
Software maintenance in software engineering is the modification of a
software product after delivery to correct faults, to improve performance or
other attributes.
A common perception of maintenance is that it merely involves fixing
defects. However, one study indicated that over 80% of maintenance effort
is used for non-corrective actions.
This perception of maintenance is perpetuated by users submitting problem
reports that in reality are functionality enhancements to the system. More
recent studies put the bug-fixing proportion closer to 21%.
SYSTEM DESIGNS
System design is the solution for the creation of a new system. This phase
focuses on the detailed implementation of the feasible system. It emphasis
on translating design. Specifications to performance specification. System
design has two phases of development
Logical design
Physical design
During logical design phase the analyst describes inputs (sources), output
s(destinations), databases (data sores) and procedures (data flows) all in a
format that meets the user requirements. The analyst also specifies the
needs of the user at a level that virtually determines the information flow in
and out of the system and the data resources. Here the logical design is
done through data flow diagrams and database design. The physical design
is followed by physical design or coding. Physical design produces the
working system by defining the design specifications, which specify
exactly what the candidate system must do. The programmers write the
necessary programs that accept input from the user, perform necessary
processing on accepted data and produce the required report on a hard
copy or display it on the screen.
Artificial intelligence makes it possible to reduce resource use and process vast amounts
of data, and, in certain cases, make better decisions than humans. It can even reduce
stress in fish.
Artificial intelligence (AI) is a word on everyone’s lips. Computing power and the sheer
amount of data to be processed are growing exponentially. With AI, vast opportunities
are opening up for performing tasks that used to require human intelligence in better,
faster and more efficient ways.
The term "Artificial Intelligence" (AI) has become an integral part of our everyday life. Almost all of us
use AI in some form or another - sometimes without even noticing it. For example, when unlocking our
smartphone via face recognition, when using Instagram, Facebook and other social media platforms or
when shopping online.
Even if we reach that state where an AI can behave as a human does, how can we be sure it can
continue to behave that way? We can base the human-likeness of an AI entity with the:
• Turing Test
• The Cognitive Modelling Approach
• The Law of Thought Approach
How Artificial Intelligence (AI) Works?
Building an AI system is a careful process of reverse-engineering human traits and capabilities in a
machine, and using it’s computational prowess to surpass what we are capable of.
To understand How Aritificial Intelligence actually works, one needs to deep dive into the various sub
domains of Artificial Intelligence and and understand how those domains could be applied into the
various fields of the industry. You can also take up an artificial intelligence course that will help you
gain a comprehensive understanding.
In this project an attempt is made to design a application for Artificial intelligence based quiz
competition. Today has become a fast growing examination method because of its speed and
accuracy. It is also needed less manpower to execute the quiz. Almost all organizations now-a-days, are
conducting their objective exams by Artificial intelligence based quiz competition, it saves
students time in quiz. Organizations can also easily check the performance of the student that they give
in an quiz. As a result of this, organizations are releasing results in less time. It also helps the
environment by saving paper.
According to today’s requirement, Artificial intelligence based quiz competition in python is very
useful to learn it.
Artificial intelligence based quiz competition is a non-removable quiz pattern of today’s life. We
need more time saving and more accurate quiz system as the number of applicants is increasing day by
day. For all IT students and professionals, it is very important to have some basic understanding about
the Artificial intelligence based quiz competition.
Hardware configuration
Software specification
ER DIAGRAM
Screenshots
Login page
quiz start
Registration page
Database
Database
Source Code
]
def run_test(questions):
score=0
for question in questions:
answer=input(question.prompt)
if answer==question.answer:
score+=1
print("You Got "+str(score)+"/"+str(len(questions)))
run_test(questions)
faceproject source code
from tkinter import*
root=Tk()
root.title("check youself before go further")
root.iconbitmap('p1.png')
img_txt source code
import pytesseract
pytesseract.pytesseract.tesseract_cmd = r'C:\Program
Files\Tesseract-OCR\tesseract'
print(pytesseract.image_to_string(r'text2.jpg'))
login page source code
from tkinter import*
from tkinter import ttk
from PIL import Image,ImageTk
from tkinter import messagebox
from register import Register
from profile import pro
import mysql.connector
class login_window:
def __init__(self,root):
self.root=root
self.root=root
self.root.title("login")
self.root.geometry("1550x800+0+0")
img=Image.open("back2021.webp")
img=img.resize((1400,1200))
self.bg=ImageTk.PhotoImage(img)
lbl_bg=Label(self.root,image=self.bg)
lbl_bg.place(x=0,y=0,relwidth=1,relheight=1)
frame=Frame(self.root,bg="grey")
frame.place(x=500,y=170,width=340,height=450)
img1=Image.open(r"user.png")
img1=img1.resize((100,100),Image.Resampling.LANCZOS)
self.photoimage1=ImageTk.PhotoImage(img1)
lblimg1=Label(image=self.photoimage1,bg="grey",borderwidth=0)
lblimg1.place(x=620,y=175,width=100,height=100)
get_str=Label(frame,text="GetStarted",font=("times new
roman",20,"bold"),fg="black",bg="grey")
get_str.place(x=95,y=100)
#labels for login
username=lbl=Label(frame,text="Email Id",font=("times of
roman",15,"bold"),fg="black",bg="grey")
username.place(x=70,y=155)
self.txtuser=ttk.Entry(frame,font=("times of roman",15,"bold"))
self.txtuser.place(x=40,y=180,width=270)
password=lbl=Label(frame,text="Password",font=("times of
roman",15,"bold"),fg="black",bg="grey")
password.place(x=70,y=225)
self.txtpass=ttk.Entry(frame,font=("times of roman",15,"bold"))
self.txtpass.config(show="*")
self.txtpass.place(x=40,y=250,width=270)
#iconimages
img2=Image.open(r"user.png")
img2=img2.resize((25,25),Image.Resampling.LANCZOS)
self.photoimage2=ImageTk.PhotoImage(img2)
lblimg2=Label(image=self.photoimage2,bg="grey",borderwidth=0)
lblimg2.place(x=542,y=325,width=25,height=25)
img3=Image.open(r"lock.png")
img3=img3.resize((25,25),Image.Resampling.LANCZOS)
self.photoimage3=ImageTk.PhotoImage(img3)
lblimg3=Label(image=self.photoimage3,bg="grey",borderwidth=0)
lblimg3.place(x=542,y=394,width=25,height=25)
#login buttons
loginbtn=Button(frame,command=self.Login,text="login",font=("ti
mes new
roman",15,"bold"),bd=3,relief=RIDGE,fg="white",bg="black",activ
eforeground="grey",activebackground="black")
loginbtn.place(x=110,y=300,width=120,height=35)
#register button
regbtn=Button(frame,text="New User
Register",command=self.register_window,font=("times new
roman",10,"bold"),borderwidth=0,fg="white",bg="grey",activeforeg
round="white",activebackground="grey")
regbtn.place(x=15,y=350,width=160)
#forgetpasswordbutton
passbtn=Button(frame,text="Forget Password",font=("times
new
roman",10,"bold"),borderwidth=0,fg="white",bg="grey",activeforeg
round="white",activebackground="grey")
passbtn.place(x=10,y=370,width=160)
def register_window(self):
obj=Register(self.root)
def Login(self):
p1=self.txtuser.get()
p2=self.txtpass.get()
print(p1)
print(p2)
my1=mysql.connector.connect(host="127.0.0.1",user="root",passwd
="")
x1=my1.cursor()
x1.execute("use xyz")
x1.execute("select * from info where email="+"'"+p1+"'"+"and
password="+"'"+p2+"'"+"")
res=x1.fetchall()
k=0
for i in res:
messagebox.showinfo("mymessage","Welcome : "+i[0])
k=k+1
pro(i[0],i[1],i[2],i[3],i[4])
break
if k==0:
messagebox.showerror("Error","Invalid Login details" )
if __name__ == "__main__":
root=Tk()
app=login_window(root)
root.mainloop()
source code p1
from tkinter import*
from PIL import ImageTk,Image
from tkinter.ttk import *
#next is a seprate next.py file and xyz is a UDF under next.py file
t=Tk()
t.geometry("1500x1300")
def go1():
xyz()
def go():
t1=Toplevel()
t1.geometry("1500x1300")
img=Image.open("img1.jpg")
img=img.resize((1500,800),Image.ANTIALIAS)
img=ImageTk.PhotoImage(img)
l=Label(t1)
l.config(image=img)
l.image=img
l.place(x=0,y=0)
x=2
img=Image.open("img2.jpg")
img=img.resize((1800,1750),Image.ANTIALIAS)
img=ImageTk.PhotoImage(img)
l=Label(t,image=img)
l.place(x=0,y=0)
sto = Style()
sto.configure('W.TButton', font= ('Arial', 20, 'underline'),
foreground='Green')
b=Button(t,style='W.TButton',text="START ON SAME
PAGE",command=go)
b.place(x=950,y=600)
b1=Button(t,style='W.TButton',text="START ON DIFFERENT
PAGE",command=go1)
b1.place(x=200,y=600)
def a():
global x
img=Image.open(r"C:\gui\p"+str(x)+".jpg")
img=img.resize((1500,800),Image.ANTIALIAS)
img=ImageTk.PhotoImage(img)
l.config(image=img)
l.image=img
x=x+1
t.after(2000,a)
if x==4:
x=2
a()
Profile source code
from tkinter import*
from tkinter import ttk
from PIL import Image,ImageTk
from tkinter import messagebox
from register import Register
from tkinter import filedialog
import pytesseract
from question import question
import mysql.connector
def pro(fname,ln,c,e,p):
t=Toplevel()
t.title("login")
t.geometry("1550x800+0+0")
fname=""
def a():
global fname
fname=filedialog.askopenfilename(title='Open Image File')
def b():
question_prompt=["What color are apple?\n(a) red/green\n(b)
gray\n(c) purpal\n\n","What color are bananas?\n(a) red\n(b)
black\n(c) yellow\n\n","which is first planet of solar system?\n(a)
venus\n(b) earth\n(c) mercury \n\n"]
questions=[
question(question_prompt[0],"a"),
question(question_prompt[1],"c"),
question(question_prompt[2],"c"),
]
def run_test(questions):
score=0
for question in questions:
answer=input(question.prompt)
if answer==question.answer:
score+=1
print("You Got "+str(score)+"/"+str(len(questions)))
run_test(questions)
img=Image.open("back2021.webp")
img=img.resize((1400,1200))
bg=ImageTk.PhotoImage(img)
#bg=ImageTk.PhotoImage(file="back2021.webp")
lbl_bg=Label(t)
lbl_bg.config(image=bg)
lbl_bg.image=bg
lbl_bg.place(x=0,y=0,relwidth=1,relheight=1)
frame=Frame(t,bg="grey")
frame.place(x=0,y=0,width=400,height=150)
b2.place(x=1000,y=290)
path=""
class Register:
def __init__(self,root):
self.root=root
self.root.title("register")
self.root.geometry("1600x900+0+0")
#variables#
self.var_fname=StringVar()
self.var_lname=StringVar()
self.var_contact=StringVar()
self.var_email=StringVar()
self.var_pass=StringVar()
self.var_confpass=StringVar()
self.bg=ImageTk.PhotoImage(file="kk.jpg")
bg_lbl=Label(self.root,image=self.bg)
bg_lbl.place(x=0,y=0,relheight=1,relwidth=1)
#frame
frame=Frame(self.root,bg="white")
frame.place(x=300,y=100,width=1000,height=500)
register_lbl=Label(frame,text="REGISTER
HERE",font=("times new
roman",25,"bold"),fg="darkgrey",bg="white")
register_lbl.place(x=20,y=20)
#label entry#
fname=Label(frame,text=" First Name",font=("times of
roman",15,"bold"),bg="white")
fname.place(x=50,y=100)
self.fname_ent=ttk.Entry(frame,textvariable=self.var_fname,font=("t
imes of roman",15,"bold"))
self.fname_ent.place(x=50,y=130,width=250)
pic=Label(frame,text=" picture",font=("times of
roman",15,"bold"),bg="white")
pic.place(x=375,y=200)
lname=Label(frame,text="Last Name",font=("times of
roman",15,"bold"),bg="white")
lname.place(x=370,y=100)
self.txt_lname=ttk.Entry(frame,textvariable=self.var_lname,font=("ti
mes of roman",15))
self.txt_lname.place(x=370,y=130,width=250)
self.pic=Label(frame,text=" picture",font=("times of
roman",15,"bold"),bg="white")
#self.pic.place(x=700,y=100)
#row 2#
self.txt_contact=ttk.Entry(frame,textvariable=self.var_contact,font=(
"times new roman",15))
self.txt_contact.place(x=50,y=200,width=250)
email=Label(frame,text="Email",font=("times new
roman",15,"bold"),bg="white",fg="black")
email.place(x=370,y=170)
self.txt_email=ttk.Entry(frame,textvariable=self.var_email,font=("ti
mes new roman",15))
self.txt_email.place(x=370,y=200,width=250)
#row3#
pswd=Label(frame,text="Password",font=("times new
roman",15,"bold"),bg="white",fg="black")
pswd.place(x=50,y=240)
self.txt_pswd=ttk.Entry(frame,textvariable=self.var_pass,font=("tim
es new roman",15))
self.txt_pswd.place(x=50,y=270,width=250)
confirm_pswd=Label(frame,text="Confirm
Password",font=("times new
roman",15,"bold"),bg="white",fg="black")
confirm_pswd.place(x=370,y=240)
self.txt_confirm_pswd=ttk.Entry(frame,textvariable=self.var_confpa
ss,font=("times new roman",15))
self.txt_confirm_pswd.place(x=370,y=270,width=250)
#check button#
self.var_check=IntVar()
checkbtn=Checkbutton(frame,variable=self.var_check,text="I
Agree The Terms and Conditions",font=("times new
roman",12,"bold"),fg="black",bg="white",onvalue=1,offvalue=0)
checkbtn.place(x=50,y=320)
#buttons#
img=Image.open(r"registerbtn.png")
img=img.resize((200,50),Image.ANTIALIAS)
self.photoimage=ImageTk.PhotoImage(img)
b1=Button(frame,image=self.photoimage,command=self.register_da
ta,borderwidth=0,cursor="hand2",font=("times new
roman",15,"bold"),fg="white",bg="white")
b1.place(x=10,y=370,width=200)
#camerabutton
img1=Image.open(r"cam.jpg")
img1=img1.resize((100,100),Image.ANTIALIAS)
self.photoimage1=ImageTk.PhotoImage(img1)
b2=Button(frame,image=self.photoimage1,command=self.camera,bo
rderwidth=0,cursor="hand2",font=("times new
roman",15,"bold"),fg="white",bg="white",activeforeground="red",a
ctivebackground="white")
# b2.place(x=330,y=370,width=200)
#function declaration#
def register_data(self):
t1=self.fname_ent.get()
t2=self.txt_lname.get()
t3=self.txt_contact.get()
t4=self.txt_email.get()
t5=self.txt_pswd.get()
t6=self.txt_confirm_pswd.get()
print(t1)
print(t2)
print(t3)
print(t4)
print(t5)
print(t6)
my=mysql.connector.connect(host="127.0.0.1",user="root",passwd=
"")
x=my.cursor()
x.execute("use xyz")
x.execute("insert into info
values("+"'"+t1+"'"+","+"'"+t2+"'"+","+"'"+t3+"'"+","+"'"+t4+"'"+","
+"'"+t5+"'"+","+"'"+t6+"'"+",'kjhjs')")
my.commit();
messagebox.showinfo("My message","You Are Register!!!!")
print(path)
def camera(self):
global path
cap=cv2.VideoCapture(0)
x=1
while (True):
rect,frame=cap.read()
cv2.imshow("MY WINDOW",frame)
my=mysql.connector.connect(host="127.0.0.1",user="root",passwd=
"")
x=my.cursor()
x.execute("use xyz")
x.execute("select * from info ")
count=0
res=x.fetchall()
for rows in res:
count=count+1
cv2.imwrite(r"x"+str(count+1)+".jpg",frame)
path=r"x"+str(count+1)+".jpg"
if cv2.waitKey(1) & 0xFF==ord('q'):
break
cap.release()
cv2.destroyAllWindows()
img=Image.open(path)
img=img.resize((200,200),Image.ANTIALIAS)
img=ImageTk.PhotoImage(img)
self.pic.config(image=img)
self.pic.image=img
if __name__=="__main__":
root=Tk()
app=Register(root)
root.mainloop()
CONCLUSION
In conclusion, the integration of AI technology into quiz
competitions has revolutionized the way we engage and interact with
these events. Through the development of intelligent algorithms,
machine learning models, and natural language processing
capabilities, AI has enhanced the quiz experience for both
participants and audiences alike.
AI-powered quiz competitions have enabled efficient question
generation, accurate scoring, and real-time feedback. This has
eliminated the need for manual question creation and evaluation,
reducing human bias and ensuring fairness. Moreover, AI algorithms
can adapt to participants' skill levels, providing customized
challenges and promoting continuous learning.
The utilization of AI in quiz competitions has not only enhanced the
overall experience but also expanded accessibility. With AI-enabled
platforms and chatbots, participants can now engage in quizzes
remotely, at any time and from anywhere, breaking down
geographical barriers and promoting inclusivity.
Additionally, AI has opened up new avenues for innovation in quiz
competitions. Techniques such as sentiment analysis and predictive
analytics can be employed to gauge audience reactions, improve
content, and enhance the overall entertainment value of quizzes. AI-
driven virtual assistants can also provide engaging interactions and
assist quiz masters in delivering a seamless and captivating
experience.
However, it is important to acknowledge that while AI brings
numerous benefits to quiz competitions, it cannot completely replace
human involvement. The human touch, creativity, and intuition
remain invaluable in crafting engaging questions and providing an
entertaining atmosphere.
In summary, the integration of AI into quiz competitions has
transformed the way we participate, spectate, and organize these
events. By leveraging the power of AI algorithms and technologies,
we can enhance fairness, accessibility, and engagement, taking the
quiz experience to new heights. As AI continues to evolve, we can
look forward to even more exciting developments in the field of quiz
competitions.