Question: For mydata2.txt please create it yourself. Please share the answers in a py file!! This assignment is to improve the score system we had for
For "mydata2.txt" please create it yourself. Please share the answers in a py file!!

This assignment is to improve the score system we had for Assignment #1. You need to write a Python program that: (1) Reads from "mydata2.txt" a set of students and their scores (one line per student), where each line contains the SID (which is a string) and his/her homework grades (which are integers). The number of students is not known in advance. (2) Computes the average score (as an integer) for each student. The average of each student is computed based on (grade total / number of homework assignments). (3) Prints the SID, the homework grades, and the average grade of each student. (4) Computes and reports the average of the class (as an integer): class average = sum of averages / number of students. (5) Computes and reports the student who has the highest average. For example, your program should report something like: SID 1001 HW1 20 HW2 30 HW3 100 Avg 50 SID 1002 HW1 80 HW2 90 HW3 100 Avg 90 SID 1003 HW1 100 HW2 100 HW3 100 Avg 100 Class Average is 80 The student with SID 1003 is the champion
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
