-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_oo_sim.py
46 lines (36 loc) · 1.11 KB
/
test_oo_sim.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
from oo_package import Quiz
import time
time.sleep(1)
#with open("reset_db.py") as f:
# exec(f.read())
time.sleep(1)
competition = Quiz(team_name='Mount Waverley',team_password='abc')
print(competition.get_question(1))
competition.submit_answer(1,'Sanjin')
competition.print_rankings()
time.sleep(2)
competition = Quiz(team_name='Box Hill',team_password='abc')
competition.submit_answer(2,'38')
competition.submit_answer(3,'Python')
competition.print_rankings()
time.sleep(2)
competition = Quiz(team_name='Melbourne High',team_password='abc')
competition.submit_answer(2,'38')
competition.submit_answer(3,'Python')
sol = '''cerpxazeceaqacth
echampionsofcode
arehereichfuxncu'''
print(competition.submit_answer(4,sol))
competition.print_rankings()
time.sleep(2)
competition = Quiz(team_name='Wantirna',team_password='abc')
competition.submit_answer(1,'Sanjin')
competition.submit_answer(2,'38')
competition.submit_answer(3,'Python')
sol = '''cerpxazeceaqacth
echampionsofcode
arehereichfuxncu'''
print(competition.submit_answer(4,sol))
competition.print_rankings()
print('Simulation complete')
competition.print_rankings()