author | Prabhu Ramachandran <prabhu@aero.iitb.ac.in> |
Sat, 19 Jun 2010 01:27:20 -0400 | |
branch | scipy2010 |
changeset 409 | 4442da6bf693 |
parent 386 | a0bec380b44f |
permissions | -rw-r--r-- |
64
333092b68926
Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
1 |
students = { |
386 | 2 |
'Madhu': 45, |
64
333092b68926
Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
3 |
'Shantanu':45, |
333092b68926
Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
4 |
'Puneeth': 54, |
333092b68926
Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
5 |
'Vattam': 35, |
386 | 6 |
'KD': 54, |
7 |
'Asokan': 45 |
|
64
333092b68926
Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
8 |
} |
333092b68926
Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
9 |
|
333092b68926
Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
10 |
all_marks = students.values() |
333092b68926
Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
11 |
unique_marks = set(all_marks) |
333092b68926
Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
12 |
|
333092b68926
Added quiz tex file and all exercise problems Madhu worked out.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
diff
changeset
|
13 |
print "Number of Duplicate marks: ", len(all_marks) - len(unique_marks) |
386 | 14 |
|
15 |
for i in unique_marks: |
|
16 |
all_marks.remove(i) |
|
17 |
||
18 |
print "Duplicate marks:", set(all_marks) |