Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
11 views8 pages

Compprojinv

The document presents a project titled 'Quizzo', a computerized quiz application developed using Python and MySQL, designed to engage students in learning through interactive quizzes. It outlines the project's objectives, advantages, and includes the source code for implementation. Acknowledgments are given to the project guide, principal, parents, and classmates for their support in completing the project.

Uploaded by

Ardnas Attad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views8 pages

Compprojinv

The document presents a project titled 'Quizzo', a computerized quiz application developed using Python and MySQL, designed to engage students in learning through interactive quizzes. It outlines the project's objectives, advantages, and includes the source code for implementation. Acknowledgments are given to the project guide, principal, parents, and classmates for their support in completing the project.

Uploaded by

Ardnas Attad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

HARIYANA VIDYA MANDIR

KOLKATA

AISSCE Session 2024-25

Quizzo

Submitted by: Sandra Datta, Trishan Fouzder

Standard: XII-B1

Roll numbers: 33,

Submitted to: Mrs Sudipta Baladhikary


ACKNOWLEDGEMENT

I would like to express a deep sense of thanks and gratitude to our project guide and teacher Ms

Sudipta Baladhikary for guiding us immensely through the course of the project. She always kept

an interest in our work. Her constructive advice and constant motivation have been responsible

for the successful completion of this project.

My sincere thanks go to our principal Ma'am for her coordination in extending every possible

support for the completion of this project.

I would also thank our parents for their constant motivation and support. We are also indebted to

our classmates for their timely help and support in the completion of this project.
INDEX

❖​ BRIEF OVERVIEW OF PROJECT


❖​ SOFTWARE AND HARDWARE REQUIREMENTS
❖​ ADVANTAGES OF PROJECT
❖​ SOURCE CODE IN PYTHON
❖​ OUTPUT SCREEN
❖​ BIBLIOGRAPHY
Brief Overview of Project:

Quizzo is based on popular reality quiz shows where a player has to answer some questions
based on various themes. The player gets to choose the correct answer from four different sets of
options. If the player chooses the right option he gets one point and proceeds. If the option was
wrong no points will be allotted.
Quiz Competitions are other events where similar mechanism is used. Programming language
used for this projects are python and MySQL. Whole program is on python whereas database is
stored on MySQL server database. Upon running the program, Player has to enter his/her name
followed by starting the quiz. At the end total points scored by the player are shown. Similar
mechanism can be seen in Quiz competitions too. Whether it be of school level or regional level.

Need Of Computerization:

The use of computerized quizzes is highly recommended for any instructor teaching a course that
is either large in size (with a typical lecture format) or that requires that students to engage in a
significant amount of assigned readings. Students appear to benefit from the use of such
computerized quizzes as they become actively engaged in the course material and study with
greater frequency throughout the semester

Computerized settings can be designed to provide students with immediate feedback regarding
their quiz grades, and allow them to take each quiz more than once to provide greater mastery of
the material. It may be helpful to limit the number of quiz attempts to three.

Automatic, computerized grading and entry of each student’s highest quiz grades into the course
gradebook will generate significant time savings for the instructor, and provide students with
immediate feedback on their quiz performance.

Advantages of the Project:

Present day everything is virtually presented. Quizzo is very simple yet has attractive interface
which makes quiz completions easier and more enjoyable.
Specific recommendations for the use of Quizzo 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

mydb = mysql.connector.connect(host="localhost", user="root",


passwd="root", database="quiz")
mycursor = mydb.cursor()

def Home():
global Question
while True:
print("Welcome to Quiz")
print("********************")
print("1. Enter Questions")
print("2. Take Quiz")
print("3. Exit")
try:
f = int(input("Enter your choice: "))
except ValueError:
print("Invalid input. Please enter a number.")
continue

if f == 1:
Question()
elif f == 2:
Quiz()
elif f == 3:
print("Exiting the Quiz")
mycursor.close()
mydb.close()
sys.exit()
else:
print("Invalid choice. Please enter 1, 2, or 3.")
def Question():
global ans, op, op1, op2, op3, op4, q
ch = 'Y'
while ch.upper() == 'Y':
print("Welcome to Question Portal")
print("***********************")
q = input("Enter the question :")
op1 = input("Enter the option 1 :")
op2 = input("Enter the option 2 :")
op3 = input("Enter the option 3 :")
op4 = input("Enter the option 4 :")

while True:
try:
op = int(input("Which option is correct answer (1,2,3,4) :"))
if 1 <= op <= 4:
break
else:
print("Please enter a number between 1 and 4.")
except ValueError:
print("Invalid input. Please enter a number.")

if op == 1:
ans = op1
elif op == 2:
ans = op2
elif op == 3:
ans = op3
elif op == 4:
ans = op4
else:
print("Please choose the correct option as answer")

mycursor.execute("Select * from question")


data = mycursor.fetchall()
qid = (mycursor.rowcount) + 1
mycursor.execute("Insert into question values (%s,%s,%s,%s,%s,%s,%s)", (qid, q, op1,
op2, op3, op4, ans))
mydb.commit()
ch = input("Question added successfully.. Do you want to add more (Y/N)")

def Quiz():
global choice, ans, ques
print("Welcome to Quiz portal")
print("***********************")
mycursor.execute("Select * from question")
data = mycursor.fetchall()
name = input("Enter your name :")
rc = mycursor.rowcount
noq = int(input("Enter the number of questions to attempt (max %s):" % rc))

# Generate a list of unique random question IDs


l = list(range(1, rc + 1))
random.shuffle(l)
l = l[:noq]

print("Quiz has started")


c=1
score = 0
for i in range(0, len(l)):
mycursor.execute("Select * from question where qid=%s", (l[i],))
ques = mycursor.fetchone()
print("--------------------------------------------------------------------------------------------")
print("Q.", c, ": ", ques[1], "\nA.", ques[2], "\t\tB.", ques[3], "\nC.", ques[4], "\t\tD.",
ques[5])
print("--------------------------------------------------------------------------------------------")
c += 1

while True:
choice = input("Answer (A,B,C,D) :")
if choice.upper() in ['A', 'B', 'C', 'D']:
break
else:
print("Invalid input. Please enter A, B, C, or D.")

if choice == 'A' or choice == 'a':


ans = ques[2]
elif choice == 'B' or choice == 'b':
ans = ques[3]
elif choice == 'C' or choice == 'c':
ans = ques[4]
elif choice == 'D' or choice == 'd':
ans = ques[5]
else:
print("Kindly select A,B,C,D as option only")

if ans == ques[6]:
print("Correct")
score = score + 1
else:
print("Incorrect.. Correct answer is :", ques[6])

print("Quiz has ended !! Your final score is :", score)


input("Press any key to continue")
Home()

Home()

You might also like