CS Project Final
CS Project Final
Bharadwaj
Roll No:-
Class:- XII ‘A’
Project name:- QUIZ Management System
Teacher name:- MR. Jitendra Sharma
School Name:- KV CRPF YELAHANKA
1
COMPUTER
SCIENCE
QUIZ
PROJECT
2
CONTENTS
S.NO. TOPIC PAGE NO.
1 CERTIFICATE 4
2 ACKNOWLEDGEMENT 5
3 INTRODUCTION 6
4 OBJECTIVES 10
5 MAINTAINANCE 11
6 SALIENT FEATURES 12
7 SYSTEM 12
REQUIREMENTS
8 SCOPE OF 13
IMPROVEMENT
9 ADVANTAGES 14
10 DATA FLOW 15
DIAGRAM (DFD)
11 FLOW CHART 16
12 PYTHON MODULES 17
13 DEBUGGING 27
14 INPUT SCREEN 28
15 SOURCE CODE 29
14 OUTPUT SCREEN 35
15 BIBLIOGRAPHY 42
3
CERTIFICATE
This is to certify that “K. Bharadwaj ” student of class XII ‘A’ has
successfully completed the research of project “QUIZ” under my
guidelines and supervision
He has submitted a file as an evidence for the same has taken proper
care and sincerely completing the project.
I certify that the file and project is upto my expectation and as per
guidelines issue by CBSE.
Examiner:-
4
ACKNOWLEDGEMENT
I undertook this Project work, as the part of my XII-Informatics
Practices course. I had tried to apply my best of knowledge and
experience, gained during the study and class work experience.
However, developing software system is generally a quite complex
and time-consuming process. It requires a systematic study, insight
vision and professional approach during the design and development.
Moreover, the developer always feels the need, the help and good
wishes of the people near you, who have considerable experience and
idea.
5
INTRODUCTION
The following project is related to “Quiz”
it consists of 2 rounds
6
of OQS is to efficiently evaluate the candidate through a
fully automated
system that not only saves lot of time but also gives
fast results.
7
manage the details of Students, Examinations, Marks,
Courses, Papers.
Couses, Papers.
8
manner and no time wasting for checking the paper. The
main objective
system that not only saves lot of time but also gives
fast results.
9
The main objective of the project on MCQ Quiz
Applications is to
Couses, Papers.
10
system. The purpose of OQS is to take Semester Quizzes
in an efficient
system that not only saves lot of time but also gives
fast results.
Couses, Papers.
12
The main objective of QS is to efficiently evaluate the
candidate through a fully automated system that not only
saves lot of time but also gives fast results.
13
The main
objective of the
project on MCQ
Quiz Applications
is to
manage the details
of Students,
Examinations,
Marks, Courses,
Papers.
It manages all the
information about
14
Students, Results,
Papers,Sudents.
The project is
totally built at
administrative end
and thus only the
administrator is
guaranteed the
access. The purpose
of the project is to
build an
application program
15
to reduce the
manual work for
Marks,
Couses, Papers.
The main
objective of the
project on MCQ
Quiz Applications
is to
manage the details
of Students,
Examinations,
16
Marks, Courses,
Papers.
It manages all the
information about
Students, Results,
Papers,Sudents.
The project is
totally built at
administrative end
and thus only the
administrator is
guaranteed the
17
access. The purpose
of the project is to
build an
application program
to reduce the
manual work for
Marks,
Couses, Papers.
The main
objective of the
project on MCQ
18
Quiz Applications
is to
manage the details
of Students,
Examinations,
Marks, Courses,
Papers.
It manages all the
information about
Students, Results,
Papers,Sudents.
19
The project is
totally built at
administrative end
and thus only the
administrator is
guaranteed the
access. The purpose
of the project is to
build an
application program
to reduce the
20
manual work for
Marks,
Couses, Papers.
The main
objective of the
project on MCQ
Quiz Applications
is to
manage the details
of Students,
Examinations,
21
Marks, Courses,
Papers.
It manages all the
information about
Students, Results,
Papers,Sudents.
The project is
totally built at
administrative end
and thus only the
administrator is
guaranteed the
22
access. The purpose
of the project is to
build an
application program
to reduce the
manual work for
Marks,
Couses, Papers.
The main
objective of the
project on MCQ
23
Quiz Applications
is to
manage the details
of Students,
Examinations,
Marks, Courses,
Papers.
It manages all the
information about
Students, Results,
Papers,Sudents.
24
The project is
totally built at
administrative end
and thus only the
administrator is
guaranteed the
access. The purpose
of the project is to
build an
application program
to reduce the
25
manual work for
Marks,
Couses, Papers.
The main
objective of the
project on MCQ
Quiz Applications
is to
manage the details
of Students,
Examinations,
26
Marks, Courses,
Papers.
It manages all the
information about
Students, Results,
Papers,Sudents.
The project is
totally built at
administrative end
and thus only the
administrator is
guaranteed the
27
access. The purpose
of the project is to
build an
application program
to reduce the
manual work for
Marks,
Couses, Papers.
The main
objective of the
project on MCQ
28
Quiz Applications
is to
manage the details
of Students,
Examinations,
Marks, Courses,
Papers.
It manages all the
information about
Students, Results,
Papers,Sudents.
29
The project is
totally built at
administrative end
and thus only the
administrator is
guaranteed the
access. The purpose
of the project is to
build an
application program
to reduce the
30
manual work for
Marks,
Couses, Papers.
31
What is My SQL ?
33
be as fast as possible. Usually there is no memory allocation at all
after query initialization. Password security by encryption of all
password traffic when you connect to a
server. Support for large databases. We use MySQL Server with
databases that contain 50 million records. We also know of users
who use MySQL Server with 200,000 tables and about
5,000,000,000 rows. MySQL client programs can be written in
many languages. A client library
written in C is available for clients written in C or C++, or for any
language
that provides C bindings. APIs for C, C++, Eiffel, Java, Perl, PHP,
Python,Ruby, and Tcl are available, enabling MySQL clients to be
written in many languages. The Connector/ODBC (MyODBC)
interface provides MySQL support for client programs that use
ODBC (Open Database Connectivity) connections. The
Connector/J interface provides MySQL support for Java client
programs that use JDBC connections. Clients can be run on
Windows or Unix. Connector/J source is available.
34
OBJECTIVES
The objective of this project is to allow the management to
maintain a clean and structured detail of their quiz programme.
Write programs utilizing modern software tools.
Apply simple principles effectively when developing small to
medium sized projects.
Write effective procedural code to store small to medium sized
information .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, requiring writing and
presentation skills which exemplify scholarly style in computer
science.
Quiz makes students memorise quickly.
Quiz are the one of the most underrated thing in our ES it gives
us more knowledge in small amount of questions.
It increases our thinking capacity
More fun while giving answers
The proposed system should maintain all the records and should
generate the required reports and information when required.
To provide graphical and user-friendly interface to interact with
a
centralized database based on client-server architecture.
To identify the critical operation procedure and possibilities of
simplification using modern IT tools and practices.
35
MAINTAINANCE
The system operation is ongoing. The system monitored for the
continued performance is accordance with user requirements
and needed system modifications are incorporated. Operation
continues as long as the system can be effectively adopted to
respond to the organisation needs. When modification or
changes are identified, the system may re enter the planning
phase . The purpose of this phase is to enhance
,operate, maintain the system.
36
SALIENT FEATURES
The program is compact in other words we can say that the
program is small and easy to carry.
The program is edited for errors.
The program can be run on many platforms.
The program is structural or we can say that a programming
paradigm that facilitates the creation of programs with readable
code and reusable components.
The program is user friendly.
SYSTEM REQUIREMENTS
Main processor :- Pentium III and above
Hard disk :- 1 GB
RAM :- 4GB RAM (4GB preferable)
37
SCOPE OF
IMPROVEMENT
The program can be made simpler.
Comments can be used in the program.
The statements in the program can be indented.
Blank lines and blank spaces can be used in the program
Connecting with MYSL database can be done more properly
So that the CSV module would be more easy and clear to uner
stand for the user
Prizes should be included so the participants will get attracted to
the project system i.e, QUIZ MANAGEMENT SYSTEM.
Competition should be there for the participants which will
make it more difficult because in nervous they can mark the
wrong answer or make mistakes.
More number of question should also be added so that they
participants or the users will fell fun while attempting the
questions.
Rounds should be made and after each round the the difficult
questions will appear.
38
Advantages of the
project
This project contains lots of question related to person .
If some person try this quiz he will remember this for a long time
because this quiz contains some fun related questions.
Thus, this quiz will help them to remember the answers with fun,
it will also increase the IQ of the particular person.
In this quiz i will ask many questions related to recent times
which is also known as Current affairs , General knowledge test
will be tested , Sports related questions , Space related question
and most of the questions will be asked from the TEXT BOOKS
of class XII which can help them to prepare for their MCQ and
CBQ which comes in their BOARD EXAMS .
These were the advantages which the user can get from this
management i.e, quiz management.
No need of pencil pen to play this quiz game.
We can quiz large number of employees all at once.
It can be given without an Instructor.
Improved overview of the workforce.
Prizes should be included so the participants will get attracted to
the project system i.e, QUIZ MANAGEMENT SYSTEM.
Competition should be there for the participants which will
make it more difficult because in nervous they can mark the
wrong answer or make mistakes.
39
DATA FLOW DIAGRAM
(DFD)
40
FLOW CHART
41
PYTHON MODULES
1. CLRPRINT MODULE
This clrprint is developed to print a colourful output on idle,
windows power shell and terminal. It has red, blue, green, yellow,
purple and black/white (default) colors. clrinput() includes a timeout
feature that returns None if no user input is received within a certain
amount of time.
This module is used in every user defined function and in the main
menu to make the texts colourful.
42
FOR EXAMPLE:- The colour will appear like this.
clrprint("\t\t*WELCOME TO QUIZ
MANAGEMENT SYSTEM*",clr="m")
clrprint()
43
clrprint("\t\t**KENDRIYA VIDYALAYA
CRPF YELAHANKA",clr="m")
clrprint()
clrprint("\t\t---------MAIN
MENU-----------",clr="m")
clrprint()
clrprint("\t\t-------QUIZ
SOFTWARE---------",clr="m")
clrprint()
clrprint("\t\t--------
1.QUESTIONS----------",clr="m")
clrprint()
clrprint("\t\t--------
2.SCORE--------------",clr="m")
clrprint()
clrprint("\t\t--------
3.RESULT-------------",clr="m")
clrprint()
44
2. MYSQL.CONNECTOR MODULE
MySQL is a Relational Database Management System (RDBMS)
whereas the structured Query Language (SQL) is the language used
for handling the RDBMS using commands ex- Creating, Inserting,
Updating and Deleting the data from the databases. SQL commands
are case insensitive ex- CREATE and create signify the same
command.
45
OUTPUT
Connection establishes successfully
If you see the following output, it means that you have been
successfully installing the MySQL Connector/Python on your system.
This module is used in the user defined function def create() to create
student record and write it into a csv file and then display it to the
user.
This user defined functions with the help of mysql.connector and csv
module creates the student records and writes them into a csv files.
After these records are written into the csv file it is read from the file
and displayed.
The code looks like this:-
#Connection Code
import mysql.connector as a
con=a.connect(host="localhost",user="root
",password="")
if con.is_connected():
else:
clrprint("not connected")
46
3. SYS MODULE
Sys=System-specific parameters and functions
stdin
stdout
stderr
stdin: It can be used to get input from the command line directly. It is
used for standard input. It internally calls the ‘input()’ method. It,
also, automatically adds ‘\n’ after each sentence.
47
3. CSV MODULE
CSV (Comma Separated Values) is a simple file format used to store
tabular data, such as a spreadsheet or database. A CSV file stores
tabular data (numbers and text) in plain text. Each line of the file is a
data record. Each record consists of one or more fields, separated by
commas. The use of the comma as a field separator is the source of
the name for this file format.
For working CSV files in Python, there is an inbuilt module called
csv.
CSV READER
Here, we first open the CSV file in READ mode. The file object is
named as csvfile. The file object is converted to csv.reader object. We
save the csv.reader object as csvreader.
CSV WRITER
Here, we first open the CSV file in WRITE mode. The file object is
named as csvfile. The file object is converted to csv.writer object. We
save the csv.writer object as csvwriter.
In the project both csv writer and csv reader are used to write the data
into a file and the read it, further applying a loop to display the
student records to the user.
The csv module is imported and the a user defined function create()
is defined to create the student record.
This user defined functions with the help of mysql.connector and csv
module creates the student records and writes them into a csv files.
48
After these records are written into the csv file it is read from the file
and displayed.
The code for this looks like:-
def create():
cnx=mysql.connector.connect(host='loc
alhost',user='root',
password='',database='stud')
cursor=cnx.cursor()
49
sql="INSERT INTO
Record(ROLLNO,Name,CLASS) VALUES (%s,%s,
%s)"
cursor.execute(sql,lr)
cnx.commit()
clrprint("\nStudent record
created successfully",clr='green')
with
open("student.csv","w",newline='') as x:
writer = csv.writer(x)
writer.writerows(record)
f=open("student.csv","r")
for i in f:
clrprint("PRINTING RECORD
",clr='purple')
print(i)
menu()
50
PROCEDURE
1. Open the Python IDLE Compiler.
2. Type the source code.
3. Save the program.
4. Compile the code.
5. Run the code.
6. Debug the program if any error occurs.
7.Save the program after debugging.
51
DEBUGGING
52
INPUT SCREEN
The input screen for the main menu will be as follows:
53
SOURCE CODE
#Connection Code
from clrprint import*
import os
import sys
import csv
import mysql.connector as a
con=a.connect(host="localhost",user="root",pass
word="",database="answers")
if con.is_connected():
clrprint("succesfully connected idle python
with mysql",clr="y")
else:
clrprint("not connected")
cursor=con.cursor()
sq='CREATE TABLE IF NOT EXISTS Answers(Question
VARCHAR(255),Correct_options CHAR(5))'
cursor.execute(sq)
con.commit()
#----------------------------------------------
------------------------------------------
def main():
clrprint()
clrprint("\t\t*WELCOME TO QUIZ MANAGEMENT
SYSTEM*",clr="m")
clrprint()
clrprint("\t\t**KENDRIYA VIDYALAYA CRPF
YELAHANKA",clr="m")
clrprint()
clrprint("\t\t---------MAIN
MENU-----------",clr="m")
clrprint()
clrprint("\t\t-------QUIZ
SOFTWARE---------",clr="m")
clrprint()
54
clrprint("\t\t--------
1.QUESTIONS----------",clr="m")
clrprint()
clrprint("\t\t--------
2.SCORE--------------",clr="m")
clrprint()
clrprint("\t\t--------
3.RESULT-------------",clr="m")
clrprint()
main()
#----------------------------------------------
--------------------------------------------
def password():
p=input("Enter password:--")
if (p=="quiz management system"):
main()
else:
print("----wrong password please enter
the right password next time----")
password()
password()
#----------------------------------------------
--------------------------------------------
def table():
l=[]
Question=input("Enter QUESTION TO BE ASKED
TO STUDENT:- ")
l.append(Question)
Correct_options=input("Enter CORRECT ANS
OF THE QUESTION:- ")
l.append(Correct_options)
lr=(l)
sql="INSERT INTO
answers(Question,Correct_options) VALUES (%s,
%s)"
cursor.execute(sql,lr)
con.commit()
55
clrprint("\nStudent record created
successfully",clr='green')
with open("student.csv","w",newline='') as
x:
writer = csv.writer(x)
writer.writerows(answers)
f=open("student.csv","r")
for i in f:
clrprint("PRINTING RECORD
",clr='purple')
print(i)
main()
#----------------------------------------------
-------------------------------------------
with open('studata.csv','w') as f:
wrt=csv.writer(f)
for i in range(6):
q=input("enter the questions:")
a=input("enter answers:")
wrt.writerow([q,a])
with open('studata.csv','r') as g:
reader=csv.reader(g)
for i in reader:
print(i)
#----------------------------------------------
-------------------------------------------
def new_game():
56
guesses = []
correct_guesses = 0
question_num = 1
correct_guesses +=
check_answer(questions.get(key), guess)
question_num += 1
display_score(correct_guesses, guesses)
# -------------------------
def check_answer(answer, guess):
if answer == guess:
clrprint("CORRECT!",clr="o")
return 1
else:
clrprint("WRONG!",clr="r")
return 0
# -------------------------
def display_score(correct_guesses, guesses):
clrprint("-------------------------",clr="s")
clrprint("RESULTS",clr="s")
clrprint("-------------------------",clr="s")
57
print("Answers: ", end="")
for i in questions:
print(questions.get(i), end=" ")
print()
score =
int((correct_guesses/len(questions))*100)
print("Your score is: "+str(score)+"%")
# -------------------------
def play_again():
if response == "YES":
return True
else:
return False
#----------------------------------------------
-----------------------------------------------
--
#the questions which will be asked:
questions={
"IDLE stands for?:":"A",
"What does the word UNGUIDED means?:":"A",
"Who is the PM of India?:":"C",
"Which is the shortest type of network?:":"D",
"NIC stands for?:":"A",
"A file which is separated by comma is ?:":"C"
}
58
#----------------------------------------------
----
#the options which will be provided are:
options=[["A.Integrated Development and
Learning Environment",
"B.Integration developed and learning
environment",
"C.Integrated developed and learning
environment",
"D.International domestic and
learning education"],
["A.Wireless connection", "B.Wired
connection","C.without any guidance", "D.None
of the above"],
["A.rahul gandhi","B.arvind
kejriwal","C.Narendra Modi","D.Amit Shah"],
["A.LAN","B.MAN","C.WAN","D.PAN"],
["A.Network Interface card",
"B.National interface card",
"C.Network International Card",
"D.Network Internal card"],
["A.Binary files",
"B.TSV files",
"C.CSV files",
"D. all of the above"]]
new_game()
while play_again():
new_game()
clrprint("Byeeeeee!",clr="m")
59
OUTPUT SCREEN
60
61
62
63
64
65
66
CSV
SQL
67
BIBLIOGRAPHY
Books
Computer Science – Textbook for Class XII
- NCERT
Computer Science with Python – Class XII
- Sumita Arora
Websites
https://www.w3schools.com/python/python_mysql_getstarted.as
https://www.geeksforgeeks.org/python-mysql/
68
THANK YOU
69