How to make a program in python to do this?
20% of the score comes from the average of 8 Quizzes (each has maximum of 10 points)
20% of the score comes from the average of 2 exams (each has maximum of 100 points)
40% of the score comes from the average of 4 Programming assignments (each has maximum of 100 points)
20% of the total score comes from the final exam (has a maximum of 100 points)
The input to the program will be from a text file which will have some lines of input. Each line of the file will begin with a string followed by a space. Then there will be several numbers separated by white spaces. The string represents the names of the students and the numbers are her scores in different quizzes assignments and exams. The first 8 numbers the quiz scores, the 9th, 10th, 11th and the 12th numbers the assignment scores, the 13th, 14th numbers are exam scores the 15th number is the final exam score. Any numbers after 15 are not important. Also an input file could have more than 3 lines and the program should still be able to calculate the averages for each line. This is what the input files data would look like.
Jim 5 4 7 6 5 7 7 7 96 76 63 56 55 76 89 76
John 9 8 6 7 4 8 6 7 66 56 76 65 55 54 46 76
Bob 6 5 5 7 5 4 4 3 76 65 87 96 67 87 76 78
The output of the program will be a text file that will show the name of the student followed by the weighted average final score.
Does anyone know how this program would be written??