-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuckets.py
50 lines (41 loc) · 1.49 KB
/
buckets.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
from student import Student
class Buckets:
#3 lists for each of the three types
#begining intermediate high
#1. english
#2. math
#3. ASL
#listed in priorty order.
# this assumes a list sorted by name, english, math, asl is students.
beginningEnglish: list = []
intermediateEnglish: list = []
advancedEnglish: list = []
beginningMath: list = []
intermediateMath: list = []
advancedMath: list = []
beginningASL: list = []
intermediateASL: list = []
advancedASL: list = []
def sortcourses(self, students: object):
for student in students:
# Put into proper Enlish bucket
if student.english <= 4:
self.beginningEnglish.append(student)
elif student.math >= 8:
self.advancedEnglish.append(student)
else:
self.intermediateEnglish.append(student)
# Put into proper Math bucket
if student.math <= 4:
self.beginningMath.append(student)
elif student.math >= 8:
self.advancedMath.append(student)
else:
self.intermediateMath.append(student)
#put into proper ASL bucket.
if student.asl <= 4:
self.beginningASL.append(student)
elif student.asl >= 8:
self.advancedASL.append(student)
else:
self.intermediateASL.append(student)