day1/exercise/readmarks.py
author Madhusudan.C.S <madhusudancs@gmail.com>
Wed, 14 Oct 2009 20:40:35 +0530
changeset 120 055b199c46c2
parent 64 333092b68926
permissions -rw-r--r--
Added NumPy array operations to session3 day1 for sslc1.txt.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
64
333092b68926 Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     1
f = open('/home/madhu/Desktop/marks.dat')
333092b68926 Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     2
333092b68926 Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     3
for line in f:
333092b68926 Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     4
    fields = line.split(';')
333092b68926 Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff changeset
     5
    print "Name: %s, Total Marks: %s" % (fields[2].strip(), fields[8].strip())