From b0873d1769b74e9e62eb794e59a763e5d7fcfa18 Mon Sep 17 00:00:00 2001 From: "Wade Fagen-Ulmschneider (waf)" <waf@illinois.edu> Date: Thu, 19 Jan 2017 14:10:39 -0600 Subject: [PATCH] activity1 --- activity1/py/compute.py | 18 ++++++++++++++++++ activity1/res/.keep | 1 + 2 files changed, 19 insertions(+) create mode 100644 activity1/py/compute.py create mode 100644 activity1/res/.keep diff --git a/activity1/py/compute.py b/activity1/py/compute.py new file mode 100644 index 0000000..02871f7 --- /dev/null +++ b/activity1/py/compute.py @@ -0,0 +1,18 @@ +# +# CS 205, Activity 1: Your Most Similar Classmate +# https://courses.engr.illinois.edu/cs199205/activity/1.php +# + +# Requires csv library +import csv + +# Reads CSV file into data +with open("res/cs205welcome_clean - Sheet1.csv") as f: + reader = csv.DictReader(f) + data = [row for row in reader] + +# Work with each row of data, one at a time +for row in data: + # Print out the name of the person for the current row + person = row["Name"] + print( person ) diff --git a/activity1/res/.keep b/activity1/res/.keep new file mode 100644 index 0000000..8d1c8b6 --- /dev/null +++ b/activity1/res/.keep @@ -0,0 +1 @@ + -- GitLab