-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfinalexam.py
70 lines (68 loc) · 861 Bytes
/
finalexam.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
1:
1.1:
False
1.2:
True
1.3:
False
1.4:
True
1.5:
True
'9/15'
2:
len(s)*2-len(s)**2
'10/10'
3:
3.1:
b
3.2:
a
3.3:
b
'10/15'
4:
1:
g
2:
h
3:
f
4:
i
5:
c
6:
d
'12/18'
5:
c
'0/5'
6:
6.1.
class LIFO(JobQueue):
def depart(self):
try:
return self.job.pop()
except:
print 'depart called with an empty queue'
raise ValueError('EmptyQueue')
change busStop to be a underclass of LIFO
'10/10'
6.2.
No because so many was left over already with low capacity busses.
'0/7'
7:
2
'0/5'
8:
return totPassengers/leftWaiting
'3/5'
9:
1:
C
2:
A
3:
B
'10/10'