-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
127 lines (112 loc) · 2.88 KB
/
Copy pathapp.py
File metadata and controls
127 lines (112 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
print("Title of program: MCQ revision program")
print()
counter = 0
score = 0
total_num_of_qn = 3
counter +=1
tracker = 0
while tracker !=1:
print("Q"+str(counter)+") "+ "Which European power got control over Malacca in 1511?")
print(" a) British")
print(" b) Spanish")
print(" c) Portugese")
print(" d) Dutch")
answer = input("Your answer: ")
answer = answer.lower()
if answer == "a":
output = "Wrong. The British took control over Singapore in 1819."
score -=1
elif answer == "b":
output = "Wrong. Spain was not a European power in Southeast Asia during that time."
score -=1
elif answer == "c":
output = "Yes, that's right!"
tracker =1
score +=1
elif answer == "d":
output = "Wrong. The Dutch wrestled Malacca from the Portugese in 1641."
score -=1
else:
output = "Please choose a, b, c or d only."
print()
print(output)
print()
print("Your current score: " + str(round((score/total_num_of_qn*100),1)) + "%" )
print()
print()
counter +=1
tracker = 0
while tracker !=1:
print("Q"+str(counter)+") "+ "以下哪一个不是一种修辞手法?")
print(" a) 肖像描写")
print(" b) 排比句")
print(" c) 夸张")
print(" d) 比喻")
answer = input("Your answer: ")
answer = answer.lower()
if answer == "a":
output = "你答对了!"
tracker =1
score +=1
elif answer == "b":
output = "错。排比句是一种修辞手法。"
score -=1
elif answer == "c":
output = "错。夸张是一种修辞手法。"
score -=1
elif answer == "d":
output = "错。夸张是一种修辞手法。"
score -=1
else:
output = "Please choose a, b, c or d only."
print()
print(output)
print()
print("Your current score: " + str(round((score/total_num_of_qn*100),1)) + "%" )
print()
print()
counter +=1
tracker = 0
while tracker !=1:
print("Q"+str(counter)+") "+ "Which represents the electronic configuration of a non-metal?")
print(" a) 2,1")
print(" b) 2,8,3")
print(" c) 2,8,8,2")
print(" d) 2,7")
answer = input("Your answer: ")
answer = answer.lower()
if answer == "a":
output = "Wrong. Think again - how many electron shells are filled, and which group is this in?"
score -=1
elif answer == "b":
output = "Wrong. Think again - how many electron shells are filled, and which group is this in?"
score -=1
elif answer == "c":
output = "Wrong. Think again - how many electron shells are filled, and which group is this in?"
score -=1
elif answer == "d":
output = "Yes, that's right!"
tracker =1
score +=1
else:
output = "Please choose a, b, c or d only."
print()
print(output.lower())
print()
print("Your current score: " + str(round((score/total_num_of_qn*100),1)) + "%" )
print()
print()
print("End of quiz!")