0% found this document useful (0 votes)
547 views35 pages

Quiz Mini Project

The document describes a mini project report submitted by two students, Manasa R and Mandhara B G, for their third semester Bachelor of Engineering degree in Computer Science and Engineering. The project developed a quiz game application under the guidance of Professor Prakruthi C. The application aims to facilitate an interactive and user-friendly quiz game to increase learning through multiple choice questions. It allows users to register, start the quiz by answering questions, check their scores and rankings upon completing the quiz game.

Uploaded by

Mandhara B G
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)
547 views35 pages

Quiz Mini Project

The document describes a mini project report submitted by two students, Manasa R and Mandhara B G, for their third semester Bachelor of Engineering degree in Computer Science and Engineering. The project developed a quiz game application under the guidance of Professor Prakruthi C. The application aims to facilitate an interactive and user-friendly quiz game to increase learning through multiple choice questions. It allows users to register, start the quiz by answering questions, check their scores and rankings upon completing the quiz game.

Uploaded by

Mandhara B G
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/ 35

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

BELAGAVI 590014, KARNATAKA

A Mini Project Report


On
“QUIZ GAME”
Submitted in Partial Fulfilment of the Requirement for
“Mini Project – 3 Sem”
rd

For the Award of

BACHELOR OF ENGINEERING

In

COMPUTER SCIENCE AND ENGINEERING

Submitted by:

MANASA R (1SG19CS056)

MANDHARA B G (1SG19CS057)

Under the guidance of:

PROF. PRAKRUTHI C

Assistant Professor

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

SAPTHAGIRI COLLEGE OF ENGINEERING


2020-2021
SAPTHAGIRI COLLEGE OF ENGINEERING

BENGALURU 560057

DEPARTMENT OF COMPUTER SCIENCE AND


ENGINEERING

CERTIFICATE
Certified that the Mini Project Work entitled “QUIZ GAME” carried out by MANASA R
and MANDHARA B G, bonafide students of Sapthagiri College of Engineering, in partial
fulfilment for the award of Bachelor of Engineering degree in Computer science and
Engineering during academic year 2020-2021. It is certified that all corrections/suggestions
indicated for Internal Assessment have been incorporated in the report deposited in the
department library

Signature of the Guide Signature of HOD

Prof. Prakruthi. C Dr. Kamalakshi Naganna

Assistant Professor Professor and Head


ACKNOWLEDGEMENT

The satisfaction that accompanies the successful completion of this project would be
incomplete without the mention of the people who made it possible, without whose constant
guidance and encouragement would have made efforts go in vain. It’s our privilege to express
gratitude and respect towards all those who guided us through the completion of this project.

We would like to express our immense gratitude to Dr. H Ramakrishna, Principal, for
his help and inspiration during the tenure of the course.

We would like to extend our sincere thanks to Dr. Kamalakshi Naganna, Professor
and Head, Department of Computer Science & Engineering, for her constant support.

We would like to express our deep gratitude and most sincere thanks to our project
guide, Prof. Prakruthi C, Assistant Professor, Department of CSE for giving the most valuable
suggestion, helpful guidance, constant support and encouragement in the execution of this
project work.

We are also thankful to all the Faculty members and supporting staff, Department of
CSE, for their constant support and encouragement.

Finally, we thank our parents and friends for their moral support.
ABSTRACT

The concept of quiz is currently very popular among educated circles as well as in
entertainment shows. Though the quiz can be conducted manually, it often needs elaborate
preparations. Quiz contributes to the growth of knowledge of an individual and they are a
popular source of entertainment.

This quiz game focuses on creating interactive quiz possibly with a question on
various topics. This quiz game is designed to increase learning of players by playing multiple
choice questions which are interactive, user friendly and fun to play.
CONTENTS

SL. NO TOPIC PAGE NO.

1. INTRODUCTION 01

2. SYSTEM REQUIREMENTS 03

3. DESIGN 04

4. IMPLEMENTATION 07

5. RESULTS 25

6. CONCLUSION 28

7. BIBLIOGRAPHY 29
LIST OF FIGURES

FIG.NO FIGURE PAGE NO

3.1 BLOCK DIAGRAM 04

3.2 USE CASE DIAGRAM 06

4.1 FLOW CHART 24


1. INTRODUCTION

Earlier Quiz Game was conducted manually in which there used to be a Quiz Master
asking questions with a book which was neither flexible nor friendly. So an automated Quiz
Game is designed to play quiz game in a more interactive and fun way which is flexible and
more reliable

1.1 BACKGROUND

C is a general-purpose high-level language that was originally developed by


Dennis Ritchie for the Unix operating system. C is highly portable and is used for scripting
system applications which form a major part of windows, UNIX and Linux operating system.C
language can efficiently work on enterprise applications, games, graphics and applications
requiring calculations etc.

The whole project is designed in ‘C’ language and different variables and
strings have been used for the development of this project. It is easy to operate and understand
by users. There is no any error and warning contents in the project. The design is so simple that
users won’t find it difficult to use and navigate.

1.2 OBJECTIVE

The main objective of “Quiz Game” is to facilitate a user-friendly environment for


all users and reduce manual effort. In past days quiz is conducted manually but in further
resolution of the technology we are able to generate the score and pose the queries
automatically. The functional requirements include to create users that are going to participate
in the quiz, automatic score and report their ranking in the quiz. In this application, all the
permissions lie with the administrator i.e., specifying the details of the quiz with checking
results will show to interviewee, addition of question and answers, marks for each question and
generating the score for each quiz.

1.3 PROBLEM STATEMENT

Quiz game is an application developed to conduct a MCQ based quiz


which helps in the enhancement of the knowledge of the user. To start the Quiz, first user has

Page | 1
to give the input to start the quiz in the main menu and then they have to register by entering
the user name. Then the rules and regulations for playing the quiz will be displayed. Quiz is
started by displaying one question after the other with the four options. If the answer is correct,
the score gets incremented by +5 points and if wrong, no points will be reduced. Instead
displays the correct answer. Once all the questions are answered, final score will be displayed
on the screen. User can also check the highest score and even their ranking too .

Page | 2
2. SYSTEM REQUIREMENTS

2.1 SOFTWARE REQUIREMENTS


This application is developed using C language

Operating system: Windows 8

C compiler software

2.2 HARDWARE REQUIREMENTS


Processor : Pentium IV or more

Speed : 2.0 GHz or more

Hard Disk : 5 MB or more

RAM : 1 GB or more

Monitor : 15.6” full HD WVA Display

Input device : Keyboard and mouse

Page | 3
3. DESIGN

3.1 SYSTEM DESIGN


Earlier Quiz games were conducted manually, which was neither flexible nor friendly.
So, an automated quiz game is designed to play quiz in a more interactive, flexible, reliable
and less time-consuming way.

3.1.1 PROPOSED SYSTEM


1. The proposed system is designed in such a way that it will be less time consuming and
more efficient.

2. The proposed system is highly error and mistake proof as no information has to be
entered manually.

3. Database of the player is stored in a record file.

4. The proposed system is designed with the below respective modules i.e.,

> Registration >Start quiz > Score

> Help > Exit

Fig: 3.1 Block diagram for the Quiz Game

Page | 4
3.2 MODULE DESIGN

3.2.1 REGISTRATION

The user first has to register the name before the user starts to play the quiz
game.

3.2.2 START QUIZ

As soon as the user chooses the quiz game menu strip the questions with 4
choices will be displayed and the user needs to select any one of the choices. Then the question
would be evaluated, if the answer is right the points get incremented by 5 and if it is wrong
then the right answer would be displayed and no points would be reduced. In such a manner
the next series of questions would be displayed till the end of the questions. Finally, the user’s
points will be displayed.

3.2.3 SCORE

This displays the scores of all the users who have played this quiz. In this

module the user can even see his ranking.

3.2.4 HELP

This displays the rules and regulations of the quiz game which has to be
followed by the user while playing the game.

3.2.5 EXIT

This strip displays two options for the user one to exit from the game and
one more to repeat the game.

Page | 5
Fig: 3.2 Use Case diagram for the Quiz Game

Page | 6
4. IMPLEMENTATION
4.1 SOURCE CODE
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>

struct play {
char name[20];
int score;
int rat; //star ratings
}p;

void high_score();
void start();
void help();

int main()
{
clrscr();
int chc=0;
printf("****************Welcome to Quiz
Game**************************************************************");
printf("\nRegister your name:\n");
scanf("%s",p.name);

printf("\tMain Menu\n1 Start the game\n2 See high scores \n3 Game help\n4 Exit");
scanf("%d",&chc);

switch(chc)
{
case 1:
printf("**********Welcome \" %s \" to C Quiz Game **********\n\n", p.name);

Page | 7
printf("\n\n *************Rules to start the game**************");
printf("\n -------------------------------------------------------------------------");
printf("\n ......................Quiz Game...........\n");
printf("\n >> There will be a total of 20 questions");
printf("\n >> You will be given 4 options and you have to press 1, 2 ,3 or 4 for the");
printf("\n right option");
printf("\n >> Each question will carry 5 points");
printf("\n >> You will be asked questions continuously.");
printf("\n >> There is no negative marking for wrong answer");

printf("\n\n ******** BEST OF LUCK *********\n\n");

start();
break;

case 2:
high_score();
break;

case 3:
help();
break;

case 4:
exit(1);
break;

default:
printf("\nInvalid input");
}

getch();
Page | 8
return 0;
}

void help()
{
int ch;

printf("\n\n ********************* GAME HELP ******************");


printf("\n -------------------------------------------------------------------------");
printf("\n .................... C program Quiz Game...........\n");
printf("\n >> There will be a total of 20 questions");
printf("\n >> You will be given 4 options and you have to press 1, 2 ,3 or 4 for the");
printf("\n right option");
printf("\n >> Each question will carry 5 points");
printf("\n >> You will be asked questions continuously.");
printf("\n >> There is no negative marking for wrong answer");

printf("\n\n ********************* BEST OF LUCK


*************************************************************\n\n");

printf("\nContinue playing ? (1/0) : ");


scanf("%d",&ch);

if(ch==1)
{
start();
}
else
{
exit();
}

}
Page | 9
void start()
{
int ans;
int count=0;
char rating[20];

FILE *fp;

if((fp=fopen("\\tmp\play2.txt","a"))==NULL)
{
printf("error opening file\n");
}
printf("Q(1).Grand Central Terminal, Park Avenue, New York is the world's \n 1.largest
railway station \t\t2.highest railway station\n 3.longest railway station\t\t 4.None of the
above\n\n");

printf("Your answer: ");


scanf("%d",& ans);

if(ans==1)
{
printf("Correct! +5 points\n\n");
++count;

}
else
{
printf("Wrong answer! Correct answer is 1.largest railway station\n\n");
}

printf("Q(2) Entomology is the science that studies \n 1.Behavior of human


beings\t\t2.Insects \n3.The origin and history of technical and scientific terms\n4.The
formation of rocks\n\n");
Page | 10
printf("Your answer: ");
scanf("%d",& ans);

if(ans==2)
{
printf("Correct! +5 points\n\n");

++count;

}
else
{
printf("Wrong answer! Correct answer is 2.Insects\n\n");
}

printf("Q(3) Eritrea, which became the 182nd member of the UN in 1993, is in the
continent of \n1.Asia\t\t2.Africa\n3.Europe\t4.Australia\n\n");

printf("Your answer: ");


scanf("%d",& ans);

if(ans==2)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 2.Africa\n\n");
}

Page | 11
printf("Q(4).Garampani sanctuary is located at \n1.Junagarh, Gujarat\t2.Diphu,
Assam\n3.Kohima, Nagaland\t4.Gangtok, Sikkim\n\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==2)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 2.Diphu, Assam\n\n");
}

printf("Q(5).For which of the following disciplines is Nobel Prize awarded? \n1.Physics


and Chemistry\t2.Physiology or Medicine\n3.Literature, Peace and Economics\t4.All of the
above\n\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==4)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 4.All of the above\n\n");
}

printf("Q(6).Hitler party which came into power in 1933 is known as \n1.Labour


Party\t2.Nazi Party\n3.Ku-Klux-Klan\t4.Democratic Party\n\n");
printf("Your answer: ");
Page | 12
scanf("%d",& ans);
if(ans==2)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 2.Nazi Party\n\n");
}

printf("Q(7). FFC stands for \n1.Foreign Finance Corporation\t2.Film Finance


Corporation\n3.Federation of Football Council\t4.None of the above\n\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==2)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 2.Film Finance Corporation\n\n");
}

printf("Q(8). Fastest shorthand writer was \n1.Dr. G. D. Bist\t2. J.R.D. Tata\n3. J.M.
Tagore\t4. Khudadad Khan\n\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==1)
{
printf("Correct! +5 points\n\n");
Page | 13
++count;
}
else
{
printf("Wrong answer! Correct answer is 1.Dr. G. D. Bist\n\n");
}

printf("Q(9). Epsom (England) is the place associated with \n1.Horse


racing\t2.Polo\n3.Shooting\t4.Snooker\n\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==1)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 1.Horse racing\n\n");
}

printf("Q(10). First human heart transplant operation conducted by Dr. Christian Bernard
on Louis Washkansky, was conducted in \n1.1967\t2.1968\n3.1958\t4.1922\n\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==1)
{
printf("Correct! +5 points\n\n");

++count;
}
else
Page | 14
{
printf("Wrong answer! Correct answer is 1. 1967\n\n");
}

printf("Q(11). Frames from one LAN can be transmitted to another LAN via the device
\n1. Router\t2. Bridge\n3. Repeater\t4. Modem\n\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==2)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 2. Bridge\n\n");
}

printf("Q(12). Which of the following conditions is used to transmit two packets over a
medium at the same time?\n1. Contention\t2. Collision\n3. Synchronous\tD.
Asynchronous\n\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==2)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 2. Collision\n\n");
}
Page | 15
printf("Q(13). What are the most commonly used transmission speeds in BPS used in data
communication?\n1. 300\t2. 1200\n3. 2400\t4. 9600\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==4)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 4. 9600\n\n");
}

printf("Q(14). Which of the following is used for modulation and demodulation?\n1.


modem\t2. protocols\n3. gateway\t4. multiplexer\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==1)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 1.modem\n\n");
}

printf("Q(15). Contention is \n1. One or more conductors that serve as a common


connection for a related group of devices\n2. a continuous frequency capable of being
modulated or impressed with a second signal\n3. the condition when two or more stations
Page | 16
attempt to use the same channel at the same time\n4. a collection of interconnected functional
units that provides a data communications service among stations attached to the network\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==3)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 3. the condition when two or more stations
attempt to use the same channel at the same time\n\n");
}

printf("Q(16). When you ping the loopback address, a packet is sent where?\n1. On the
network\n2. Down through the layers of the IP architecture and then up the layers again\n3.
Across the wire\n4. through the loopback dongle\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==2)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 2. Down through the layers of the IP
architecture and then up the layers again\n\n");
}

Page | 17
printf("Q(17). Which of the following TCP/IP protocols is used for transferring electronic
mail messages from one machine to another?\n1. FTP\t2. SNMP\n3. SMTP\t4. RPC\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==3)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 3. SMTP\n\n");
}

printf("Q(18). Which of the following devices is used to connect two systems, especially
if the systems use different protocols?\n1. hub\t2. bridge\n3. gateway\t4. repeater\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==3)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 3. gateway\n\n");
}

printf("Q(19). The slowest transmission speeds are those of\n1. twisted-pair wire\t2.
coaxial cable\n3. fiber-optic cable\t4. microwaves\n");
printf("Your answer: ");
scanf("%d",& ans);
Page | 18
if(ans==1)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 1. twisted-pair wire\n\n");
}

printf("Q(20). What is the port number for NNTP?\n1. 119\t2. 80\n3. 79\t4. 70\n");
printf("Your answer: ");
scanf("%d",& ans);
if(ans==1)
{
printf("Correct! +5 points\n\n");

++count;
}
else
{
printf("Wrong answer! Correct answer is 1. 119 \n\n");
}

//counting number of correct answers and, ratings


if(count > 0)
{
printf("Thanks for playing, Your scored: %d points \t", count*5);

p.score=count*5;

if(p.score >= 80)


Page | 19
{
printf("\nRating: Excellent");
p.rat=5;
}
else if(p.score >= 60 && p.score < 80)
{
printf("\nRating:Good");
p.rat=4;
}
else if(p.score >= 40 && p.score < 60)
{
printf("\nRating:Above average");
p.rat=3;
}
else if(p.score >= 20 && p.score < 40)
{
printf("\nRating: Average");
p.rat=2;
}
else if(p.score < 20)
{
printf("\nRating:Poor");
p.rat=1;
}

//writing to file

fprintf(fp,"%s %d %d", p.name,p.score,p.rat);


fclose(fp);
}
else
{
printf("Try again!");
}
Page | 20
int ch;
printf("\n1 Continue\n2 main menu ");
scanf("%d",&ch);
switch(ch)
{
case 1: start();
break;
case 2:main();
break;
default:exit(1);
}
}

void high_score()
{

int ch;

FILE *fp;
if((fp=fopen("\\tmp\play2.txt", "r"))==NULL)
{
//printf("error opening file\n");
printf("\nNo games played yet!\n");
}
else
{

printf("\n******************************* HIGH SCORES


*******************************\n\n");
printf("NAME POINTS RATING\n");
while(fscanf(fp,"%s %d %d",p.name,&p.score, &p.rat) !=EOF)
{
printf("____________________________\n");
printf("%s %d %d star(s)\n\n",p.name,p.score,p.rat);
Page | 21
}

fclose(fp);

}
printf("\nContinue playing ? (1 - Yes and 0 - No) : ");
scanf("%d",&ch);

if(ch==1)
{
start();
}
else
{
exit();
}

}
void exit()
{
int ch;
printf("\nContinue playing ? (1 - Yes and 0 - No) : ");
scanf("%d",&ch);

if(ch==1)
{
start();
}
else
{
printf(“ Try again next time”);
}
}

Page | 22
4.2 ALGORITHM

Step 1 : Start

Step 2 : Register with name.

Step 3 : Main Menu will be displayed.

Step 4 : User input for the options in the Main Menu.

Step 5 : If user input is Help, the rules for the quiz game will be displayed.

Step 6 : If user input is score, the scores of all the users will be displayed.

Step 7 : If user input is exit, the game will end.

Step 8 : If user input is start, the quiz game will start by displaying questions.

Step 9 : User input for the answer for the question displayed.

Step 10: If the answer is correct,the score gets incremented by 5 points.

Step 11: If the answer is wrong, the correct answer would be displayed and score
remains unchanged.

Step 12: Next series of questions will be displayed.

Step 13: Once all the questions are answered, the score of the user will be displayed.

Step 14: End

Page | 23
FLOW CHART

Fig 4.1 Flow chart for the quiz game

Page | 24
5. RESULT

REGISTRATION

MAIN MENU

START

Page | 25
HIGH SCORE

GAME HELP

EXIT

Page | 26
ADVANTAGES
 The game designed is user friendly and interactive.

 Simple and easy to play.

 Automated score is calculated and displayed.

 The designed game is highly error and mistake proof as no information has to be entered
manually.

 The proposed system is less time consuming and more efficient.

DISADVANTAGES
 No time limit for answering each question.

 Questions remain the same for all the users.

 Users can play the quiz any number of times.

Page | 27
6. CONCLUSION

The software ‘QUIZ’ created is intended to minimize the time required to administer a quiz ,
to measure the points, to shortlist the participant name , and thereby to improve the performance
. It is planned to replace current manual documentation and correction. The introduction of the
method in the enterprise would dramatically minimize time and will also have easily measured
markers.

Page | 28
7. BIBLIOGRAPHY

www.geeksforgeeks.org

www.researchgate.net

www.tutorialspoint.com

Page | 29

You might also like