From 90a13ed5f273db0bc36f15a64f0f26ecd03323fd Mon Sep 17 00:00:00 2001 From: shull4 <38736313+shull4@users.noreply.github.com> Date: Tue, 10 Jul 2018 11:58:34 -0400 Subject: [PATCH] Add files via upload --- Help_Script.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Help_Script.py diff --git a/Help_Script.py b/Help_Script.py new file mode 100644 index 0000000..3a3b0e7 --- /dev/null +++ b/Help_Script.py @@ -0,0 +1,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='') +