Python Py
Python Py
(COMPUTER QUIZ)
Submitted by
Satyam Prasad & Payal
Sharma
XII(Sci)
Roll no(board)
Computer Science
Session 2022-23
1|Page
KENDRIYA VIDYALAYA SUKNA
CERTIFICATE
…………………………….
PGT(Computer Science)
External Examiner
2|Page
KENDRIYA VIDYALAYA SUKNA
CERTIFICATE
…………………………….
PGT(Computer Science)
External Examiner
3|Page
ACKNOWLEDGEMENT
SIGNATURE
Name of Student: Satayam Prasad &
Payal Sharma
4|Page
CLASS XII
S. Sign
Contents Date
No.
1 Certificate
2 Acknowledgements
3 Declaration
4 Introduction
5 Aims
7 Requirements
8 Bibliography
INTRODUCTION
A computer quiz is a form of game or mind sport in which players
attempt to answer questions correctly on one or several specific topics.
Quizzes can be used as a brief assessment in education and similar
fields to measure growth in knowledge, abilities, or skills. They can also
be televised for entertainment purposes, often in a game show format.
5|Page
The earliest known examples of the word date back to 1780; its
etymology is unknown, but it may have originated in student slang. It
initially meant an "odd, eccentric person" or a "joke, hoax". Later
(perhaps by association with words such as "inquisitive") it came to
mean "to observe, study intently", and thence (from about mid-19th
century) "test, exam."
There is a well-known myth about the word quiz that says that in 1791 a
Dublin theatre owner named Richard Daly made a bet that he could
introduce a word into the language within 24 hours. He then went out
and hired a group of street children to write the word "quiz", which was
a nonsense word, on walls around the city of Dublin. Within a day, the
word was common currency and had acquired a meaning (since no one
knew what it meant, everyone thought it was some sort of test) and Daly
had some extra cash in his pocket.[4] However, there is no evidence to
support the story, and the term was already in use before the alleged bet
in 1791. In an educational context, a quiz is usually a form of a student
assessment, but often has fewer questions of less difficulty and requires
less time for completion than a test. This use is typically found in the
United States, Canada, the Philippines, Dominican Republic and some
colleges in India. For instance, in a mathematics classroom, a quiz may
check comprehension of a type of mathematical exercise. Some
instructors schedule a daily or weekly quiz ranging from five to thirty
relatively easy questions for the purpose of having the students review
their previous lessons before attending the next class. A "pop quiz" is a
quiz that students are given no time to prepare for; they are simply
surprised with it in classAdditionally, a personality quiz may be a series
of multiple-choice questions about the respondent without right or wrong
answers. The responses to these questions are tallied according to a
key, and the result purports to reveal some quality of the respondent.
This kind of "quiz" was originally popularized by women's magazines
such as Cosmopolitan. They have since become common on
the Internet, where the result page typically includes code which can be
added to a blog entry to publicize the result. These postings are common
on many sites like LiveJournal.
AIM
7|Page
SOURCE CODE
print('''**Welcome to my computer quiz:**
-----POINTS TO NOTE-----\n
1.There are total 20 questions\n
2.you have to type the full answer\n
3.All the answers should be in fully small letters\n
4.In case of option base question, you have to type your
answer, instead of typing (a),(b),(d) or (d)\n''')
if playing !='yes':
quit()
8|Page
if answer == 'guido van rossum':
print('Correct Answer\n ')
score += 1
else:
print('Incorrect Answer\n The correct answer is:
guido van rossum\n ')
i=1
while True:
if i%3 == 0:
break
print(i)
i + = 1\n: ''')
if answer == ('error'):
print('Correct Answer\n ')
score += 1
else:
print('Incorrect Answer\n The correct answer is:
error\n ')
10 | P a g e
answer = input('''8.Which of the following functions is a
built-in function in python?
a) factorial()
b) print()
c) seed()
d) sqrt()
\n: ''')
if answer == ('print'):
print('Correct Answer\n ')
score += 1
else:
print('Incorrect Answer\n The correct answer is:
print\n ')
round(4.576)\n: ''')
if answer == ('5'):
print('Correct Answer\n ')
score += 1
else:
print('Incorrect Answer\n The correct answer is: 5\n ')
def foo():
try:
return 1
13 | P a g e
finally:
return 2
k = foo()
print(k)\n: ''')
if answer == ('3'):
print('Correct Answer\n ')
score += 1
else:
print('Incorrect Answer\n The correct answer is: 3\n ')
14 | P a g e
answer = input('''18. Which of the following can add a
row to a table?
Add
Insert
Update
Alter\n: ''')
if answer == ('insert'):
print('Correct Answer\n ')
score += 1
else:
print('Incorrect Answer\n The correct answer is:
insert\n ')
15 | P a g e
answer = input('20.Which MySQL statement is used to
delete data from a database?\n: ')
if answer == ('delete'):
print('Correct Answer\n ')
score += 1
else:
print('Incorrect Answer\n The correct answer is:
delete\n ')
print('-----RESULT-----')
print('')
print('')
print('YOU HAVE ' + str(score) + ' QUESTION
CORRECT')
print('')
print('YOU GOT ' + str(score/20*100) + ' %.')
print('')
print('**THANK YOU FOR PLAYING THIS
QUIZ**')
print('')
print('')
print('##### CODED BY SATYAM PRASAD #####')
16 | P a g e
SCREEN SHOT
17 | P a g e
Requirements
HARDWARE AND SOFTWARE REQUIREMENTS
ATHALON(3800+-
SOFTWARE REQUIREMENTS:
I. Windows OS
II. Python
III. MySql
18 | P a g e
BIBLOGRAPHY
19 | P a g e