-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexam_template-workPC.py
196 lines (133 loc) · 5.99 KB
/
exam_template-workPC.py
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
import toolbox_extended as te
import toolbox_02450 as tb
import numpy as np
import pandas as pd
from exam_toolbox import *
import re
import os
class exam:
# ----------------------------------------------- OPG 1-----------------------------------------------
def opg1():
return "E"
# ----------------------------------------------- OPG 2-----------------------------------------------
def opg2():
return "E"
# ----------------------------------------------- OPG 3-----------------------------------------------
def opg3():
return "E"
# ----------------------------------------------- OPG 4-----------------------------------------------
def opg4():
return "E"
# ----------------------------------------------- OPG 5-----------------------------------------------
def opg5():
return "E"
# ----------------------------------------------- OPG 6-----------------------------------------------
def opg6():
return "E"
# ----------------------------------------------- OPG 7-----------------------------------------------
def opg7():
return "E"
# ----------------------------------------------- OPG 8-----------------------------------------------
def opg8():
return "E"
# ----------------------------------------------- OPG 9-----------------------------------------------
def opg9():
return "E"
# ----------------------------------------------- OPG 10-----------------------------------------------
def opg10():
return "E"
# ----------------------------------------------- OPG 11-----------------------------------------------
def opg11():
return "E"
# ----------------------------------------------- OPG 12-----------------------------------------------
def opg12():
return "E"
# ----------------------------------------------- OPG 13-----------------------------------------------
def opg13():
return "E"
# ----------------------------------------------- OPG 14-----------------------------------------------
def opg14():
print()
return "E"
# ----------------------------------------------- OPG 15-----------------------------------------------
def opg15():
return "E"
# ----------------------------------------------- OPG 16-----------------------------------------------
def opg16():
return "E"
# ----------------------------------------------- OPG 17-----------------------------------------------
def opg17():
return "E"
# ----------------------------------------------- OPG 18-----------------------------------------------
def opg18():
return "E"
# ----------------------------------------------- OPG 19-----------------------------------------------
def opg19():
return "E"
# ----------------------------------------------- OPG 20-----------------------------------------------
def opg20():
return "E"
# ----------------------------------------------- OPG 21-----------------------------------------------
def opg21():
return "E"
# ----------------------------------------------- OPG 22-----------------------------------------------
def opg22():
return "E"
# ----------------------------------------------- OPG 23-----------------------------------------------
def opg23():
return "E"
# ----------------------------------------------- OPG 24-----------------------------------------------
def opg24():
return "E"
# ----------------------------------------------- OPG 25-----------------------------------------------
def opg25():
return "E"
# ----------------------------------------------- OPG 26-----------------------------------------------
def opg26():
return "E"
# ----------------------------------------------- OPG 27-----------------------------------------------
def opg27():
return "E"
# -------------------------------- answers dataframe -------------------------------------------------
def answers(show=True, csv=False, excel=True):
ans = pd.DataFrame(
columns=["Student number: s183920"]
) # columns = ["OPG", "svar"])
ans.loc[0] = ""
ans.loc[1] = "Q01: {}".format(exam.opg1())
ans.loc[2] = "Q02: {}".format(exam.opg2())
ans.loc[3] = "Q03: {}".format(exam.opg3())
ans.loc[4] = "Q04: {}".format(exam.opg4())
ans.loc[5] = "Q05: {}".format(exam.opg5())
ans.loc[6] = "Q06: {}".format(exam.opg6())
ans.loc[7] = "Q07: {}".format(exam.opg7())
ans.loc[8] = "Q08: {}".format(exam.opg8())
ans.loc[9] = "Q09: {}".format(exam.opg9())
ans.loc[10] = "Q10: {}".format(exam.opg10())
ans.loc[11] = ""
ans.loc[12] = "Q11: {}".format(exam.opg11())
ans.loc[13] = "Q12: {}".format(exam.opg12())
ans.loc[14] = "Q13: {}".format(exam.opg13())
ans.loc[15] = "Q14: {}".format(exam.opg14())
ans.loc[16] = "Q15: {}".format(exam.opg15())
ans.loc[17] = "Q16: {}".format(exam.opg16())
ans.loc[18] = "Q17: {}".format(exam.opg17())
ans.loc[19] = "Q18: {}".format(exam.opg18())
ans.loc[20] = "Q19: {}".format(exam.opg19())
ans.loc[21] = "Q20: {}".format(exam.opg20())
ans.loc[22] = ""
ans.loc[23] = "Q21: {}".format(exam.opg21())
ans.loc[24] = "Q22: {}".format(exam.opg22())
ans.loc[25] = "Q23: {}".format(exam.opg23())
ans.loc[26] = "Q24: {}".format(exam.opg24())
ans.loc[27] = "Q25: {}".format(exam.opg25())
ans.loc[28] = "Q26: {}".format(exam.opg26())
ans.loc[29] = "Q27: {}".format(exam.opg27())
if excel:
ans.to_excel(re.sub(".py", "_answers.xlsx", __file__), index=False)
if csv:
ans.to_csv(re.sub(".py", "_answers.csv", __file__), index=False)
if show:
print(ans)
return ans
exam.answers()