-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelp_Script.py
More file actions
25 lines (22 loc) · 856 Bytes
/
Help_Script.py
File metadata and controls
25 lines (22 loc) · 856 Bytes
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
class Help_Script:
import csv
studentDict = {}
with open('Data - Students.csv', 'r') as fp:
reader1 = csv.reader(fp, delimiter=',', quotechar='"')
student_read = [row for row in reader1]
x = 0
for data in student_read:
if x == 0:
x += 1
else:
studentDict[data[0].strip()] = data[2].strip()
with open('Data - Help requests.csv', 'r') as csvfile:
reader = csv.reader(csvfile, delimiter=',', quotechar='"')
data_read = [row for row in reader]
x = 0
for data in data_read:
if x == 0:
x += 1
else:
if(data[6].strip() == 'DEBUG' or data[6].strip() == 'Reuse'):
print(studentDict[data[1].strip()], " used ", data[6].strip()," on 7/", data[2].strip(),"/18", sep='')