-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp01.py
More file actions
120 lines (96 loc) · 2.59 KB
/
app01.py
File metadata and controls
120 lines (96 loc) · 2.59 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
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)+") "+ "find y if 8x2+4/y=22?")
print(" a) 22")
print(" b) 24")
print(" c) 14")
print(" d) 6")
answer = input("Your answer: ")
answer = answer.lower()
if answer == "b":
output = "correct!:)")
score +=1
else answer == "a":
output = "Wrong. Clue:4/y=22-8x2."
score -=1
else answer == "c":
output = "Wrong. Clue:4/y=22-8x2."
score -=1
else answer == "d":
output = "Wrong. Clue:4/y=22-8x2."
score -=1
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)+") "+ "how many atoms are there in NaHCO3 represents")
print(" a) 7")
print(" b) 12")
print(" c) 6")
print(" d) 4")
answer = input("Your answer: ")
answer = answer.lower()
if answer == "a":
output = "wrong. Clue:chemical symbols start with a capital letter."
tracker =1
score -=1
elif answer == "b":
output = "Wrong. clue:are you sure it is (NaHCO)3??."
score -=1
elif answer == "c":
output = "Correct!:)"
score +=1
elif answer == "d":
output = "Wrong. clue: I think you forgot about the 3."
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!:)")