forked from maxjdobrei/cuHacking
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTutorial.py
38 lines (35 loc) · 846 Bytes
/
Tutorial.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
class Tutorial:
startTime=tuple()
endTime=tuple()
location=""
days=[]
courseCode=""
def __init__(self,courseCode,Time,location,day):
Start= Time[0].split(":")
End= Time[1].split(":")
self.courseCode=courseCode
self.startTime= (int(Start[0]), int(Start[1]))
self.endTime= (int(End[0]), int(End[1]))
self.location=location
self.days=self.convertDay(day)
def convertDay(self, day):
dayNum = []
tempdays = day
for days in tempdays:
if days == "Mon":
dayNum.append(0)
elif days == "Tue":
dayNum.append(1)
elif days == "Wed":
dayNum.append(2)
elif days == "Thu":
dayNum.append(3)
elif days == "Fri":
dayNum.append(4)
return dayNum
def getTimes(self):
return (self.startTime, self.endTime)
def getDay(self):
return self.days
def getCoursecode(self):
return self.courseCode[:8]