Computer Science Project Roll No.1
Computer Science Project Roll No.1
1
BANBASA CANTT {2024-25}
CLASS-11TH A
ROLL NO. 1
SUBMITTED TO- DINESH ARYA
SIR
•ACKNOWLEDGEMENT
Examiner’s sign
•INDEX
Front page
Acknowledgem
ent
Certificate
Index
Introduction
Program
Output
Biblography
•INTRODUCTION
In this program , I make a quiz program in which
the program ask some basic question about
python.
In the program the ask five question if question is
right you will get +1 point and if the answer is
wrong you will get -1.
You write the answer like:-
a.right (if a is
correct)
b.wrong
then you will write:-
right
• PROGRAM
q1="""Who invented Python?
a. Steve Jobs
b. Guido van Rossum
c. Bill Gates
d. Tim Cook"""
q2="""In which year was Python Invented?
a. 1995
b. 1991
c. 1899
d. 1998"""
q3="""Is Pyhton case sensitive when dealing with Identifiers?
(for reference)
a. Yes
b. No
c. Machine Dependent
d. None of the above"""
q4="""Which of the following is the correct extension of the
Python File?
a. .python
b. .py
c. .pl
d. .p"""
q5="""Is Python code compiled or interpreted? (For
reference )
a. Both Compiled and interpreted
b. Neither Compiled nor Interpreted
c. Only Compiled
d. Only Interpreted""“
questions = {q1:"Guido van
Rossum",q2:"1991",q3:"Yes",q4:".py",q5:"Only Interpreted"}
print("---- PYTHON BASED QUIZ ----\n")
name=input("Enter your name: ")
print("******************************************")
print("Hello",name,"Welcome to the PYTHON BASED QUIZ
desgined by Saad A.")
score=0
(for reference)
(For reference
)
for i in questions:
print(i)
ans=input("Enter the answer: ")
if ans==questions[i]:
print("Correct Answer, you got 1 POINT HURRAY!!") (For
reference )
print("******************************************")
score=score+1
else:
print("Wrong Answer, you lost 1 POINT!!")
print("***************************************************************")
score=score-1
print("Final Score is:",score)
print("****************************************************")
print("\n")
print("----- THANKS FOR PLAYING -----")
•OUTPU
T
When we run the program the first
interference is:-
After entering
it retuns that
answer is
correct/wrong
and next
question as well
as
At last after doing all the question
it retuns the FINAL SCORE
The final
score
www.google .com
Miscrosoft ppt
_________***************THANK
YOU*************_________