-
Notifications
You must be signed in to change notification settings - Fork 1
/
KZ_ADriver.py
42 lines (31 loc) · 1.11 KB
/
KZ_ADriver.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
from Student import * #get classes Student
from Test import * #get classes Test
import random
#
class ADrive:
# Create an array of students with varying ability levels
def __init__(self,num_s,num_q):
students = self.gen_students(num_s)
print ("\n\n\n Standard Test \n\n")
newTest = Test(num_q, students)
newTest.start()
newTest.printResult()
print ("\n\n\n Optimized Test \n\n")
optTest = Test(num_q, students)
optTest.start_opt()
optTest.printResult()
def gen_students(self, num_s):
students = [0]*num_s
for i in range(num_s):
age = random.randint(15,25)
level = random.randint(1,10)
students[i] = Student(i, age, level)
#print(i)
return students
def get_student(self, stu_num):
return students[stu_num]
num_s = raw_input(">>> How many students are we testing? : ")
num_q = raw_input(">>> How many questions are we asking per student? : ")
tester = ADrive(int(num_s),int(num_q))
raw_input(">>> Hit Enter to exit")
# Instantiate a TEST object with an array of Students