author | Nishanth Amuluru <nishanth@fossee.in> |
Tue, 14 Dec 2010 23:15:36 +0530 | |
branch | scipyin2010 |
changeset 456 | a27ccfc118fb |
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) |