Compute GPA and honors
Input
s = Student('Ana', 'Bell', [4.0, 3.7]) s.average()
Output
3.85
Average of [4.0, 3.7] is (4.0 + 3.7)/2 = 3.85. The method returns the value rounded to 2 decimals.
Full lesson preview
Implement a Student class with common behaviors: full name, grade management, GPA calculation, and honors detection.
Problem statement
Task
Examples
Input
s = Student('Ana', 'Bell', [4.0, 3.7]) s.average()
Output
3.85
Average of [4.0, 3.7] is (4.0 + 3.7)/2 = 3.85. The method returns the value rounded to 2 decimals.
Input format
Output format
Constraints
Samples
Input
Student('John','Doe',[3.0,4.0,3.7]).letter_grade()
Output
B
The average is 3.57, which maps to letter grade 'B' with the mapping: A >= 3.7, B >= 3.0, C >= 2.0, D >= 1.0, else F.