- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMultipleChoiceQuiz.py
More file actions
Latest commit
23 lines (19 loc) · 551 Bytes
/
Copy pathMultipleChoiceQuiz.py
File metadata and controls
23 lines (19 loc) · 551 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
fromMultipleChoiceQuizClassimportquestions
qstn= [
"What colour are apples?\n(A) Red/Green\n(B)Yellow\n(C)Blue\n",
"What colour are bananas?\n(A)Orange\n(B)Red\n(C)Yellow\n",
"What colour are strawberries?\n(A)Black\n(B)Red Pinkish\n(C)Yellow\n"
]
questions= [
questions(qstn[0],"A"),
questions(qstn[1],"C"),
questions(qstn[2],"B")
]
defMCQ(questions):
score=0
forquestioninquestions:
ans=input(question.q)
ifans==question.ans:
score+=1
print(score)
MCQ(questions)