You are on page 1of 1

Due Date: 23rd Sep 2012 ASSIGNMENT NO.

3 Late submissions will be penalized as follows: Within a week of Due date: 80% After that: 50%

1. Create a dict of 10 students comprising of names and marks, entered via the keyboard. Sort the dict by marks and print the name and marks of the student with the highest marks 2. Create a list of 10 real valued numbers representing marks entered via the keyboard. Print the sorted version of this list, and the average marks of the class. 3. Download the file big.txt attached with this assignment. The file contains comma separated values on multiple lines. The first value represents an index of the protein (say 1,2,3 etc). The remaining 10 values represent attributes like hydrophobicity etc of that protein. Each line would look like: 1,10.3, 5.6,6.7,8.74,9.65,8.95,10.56,1.1,2.2,3,3 Write a program to read the file big.txt, and generate a new file that will contain the index of the proteins followed by the average of the 10 values. The resulting file should look like 1,4.5 2,3.4 3,5.6 (assuming 4.5 is the avg value of the 10 attributes in the first row, 3.4 of the second row and so on)

You might also like