Quiz
Quiz
Quiz
MADE BY:
CERTIFICATE
CLASS: XII A YEAR:
ACKNOWLEDGEMENT
DHRUV KUMAR OF CLASS 12 ‘A’ ROLLNO.17742177 WOULD LIKE TO
EXPRESS MY SINCERE GRATITUDE TO MY COMPUTER SCIENCE
TEACHER PGT COMPUTER SCIENCE, FOR HER VITAL SUPPORT,
GUIDANCE AND ENCOURAGEMENT—WITHOUT WHICH THIS PROJECT
WOULD NOT HAVE COME FORTH.
INDEX
ADVANTAGES OF PROJECT
OUTPUT SCREEN
lIMITATIONS
BIBLIOGRAPHY
Brief Overview OF
Project
Software AND
Hardware
Requirements
#SOFTWARE SPECIFICATION
Database : MySQL
Languages : Python
#HARDWARE SPECIFICATION
Hard Disk: 40 GB
RAM : 1024 MB
Advantages OF
Project
Present day everything is virtually presented.
Quiz master is very simple yet has attractive interface which makes quiz
completions easier and more enjoyable.
Sspecific recommendations for the use of Quiz Master can be made
including:
To encourage students to engage in long-term learning, include
some of the individual online quiz questions on midterm and
final exams
To deter student cheating, the order of quiz questions as well as
their multiple choice answers is randomized.
User friendly
Responsive design
Automatically checks answers
It saves paper
Publishes score instantaneously after quiz ends
#SOURCE CODE IN
PYTHON
import sys
import mysql.connector
import random
passwd="12345",database= "quiz")
mycursor=mydb.cursor()
def Home():
f=1
while f!=3:
print("Welcome to Quiz")
print("********************")
print("3. Exit")
if f==1:
Question()
elif f==2:
Quiz()
elif f==3:
mycursor.close()
mydb.close()
sys.exit();
else:
Home()
def Question():
ch='Y'
print("***********************")
ans=0
while ans==0:
if op==1:
ans=op1
elif op==2:
ans=op2
elif op==3:
ans=op3
elif op==4:
ans=op4
else:
data=mycursor.fetchall()
qid=(mycursor.rowcount)+1
mydb.commit()
Home()
def Quiz():
print("***********************")
data=mycursor.fetchall()
rc=mycursor.rowcount
l=[]
while len(l)!=noq:
x=random.randint(1,rc)
if l.count(x)>0:
l.remove(x)
else:
l.append(x)
c=1
score=0
for i in range(0,len(l)):
print("--------------------------------------------------------------------------------------------")
print("Q.",c,": ",ques[1],"\nA.",ques[2],"\t\tB.",ques[3],"\nC.",ques[4],"\t\tD.",ques[5])
print("--------------------------------------------------------------------------------------------")
c+=1
ans=None
while ans==None:
if choice=='A' or choice=='a':
ans=ques[2]
ans=ques[3]
ans=ques[4]
ans=ques[5]
else:
if ans==ques[6]:
print("Correct")
score=score+1
else:
Home()
Home()
#OUTPUT SCREEN
#MYSQL TABLE
LIMITATIONS
Website pythonnotes.org