-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmltp2.py
More file actions
20 lines (19 loc) · 736 Bytes
/
mltp2.py
File metadata and controls
20 lines (19 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from Question import Question
question1 = "What color are apples?\n (a)Red/Green (b)Purple (c)Orange \n\n",
question2 = "What color are Bananas?\n (a)Teal (b)Magenta (c)Yellow\n\n",
question3 = "What color are Strawberries?\n (a)Yellow (b)Red (c)Blue\n\n"
question4 = "What color are onions?\n (a)Purple (b) Green (c) Violet\n\n"
questions = [
Question(question1, "a"),
Question(question2, "c"),
Question(question3, "b"),
Question(question4, "a" or "c")
]
def run_test(questions):
score = 0
for question in questions:
answer = input(questions)
if answer == question.answer:
score += 1
print("You got " +str(score) + "/" + str(len(questions)) + "correct!!")
run_test(questions)