For this assignment, you must implement a course grading program. Your program should read from…
For this assignment, you must implement a course grading program. Your program should read from an input file called “grades.txt” of the following format:
2
John Doe
82
100
57
0
Jane Smith
91
12
45
81
0
The first number represents the total number of students included in the file. The number of grades for each student is unknown. The zero signifies the end of a student’s grades. Your program should calculate the average of each student’s grades and output the following to the screen (with the grades now sorted, ascending):
John Doe 57, 82, 100 — B
Jane Smith 12, 45, 81, 91 — A
Your program should write to an output file called “summary.txt” a summary like the following:
Number of students: 12
Average grade: 72.5
Highest grade: 97
Lowest grade: 34
Student with longest name: Jane Smith
You must create a class called Student that represents a student’s information. This class must contain attributes for the first name, last name, and list of grades. It must override the __str__ method that prints the student information as it should be displayed to the screen (see above). It must also provide a method called get_average that returns the average grade for the student, as well as a method called get_letter that returns the letter grade representation of the student’s average.