class Student:
def __init__(self, name, grades):
self.name = name
self.grades = grades
def calculate_average(self):
return sum(self.grades) / len(self.grades)
def display_info(self):
print(f"Ученик: {self.name}")
print(f"Средняя оценка: {self.calculate_average():.2f}")
student = Student(name="Иван Иванов", grades=[4.5, 3.8, 4.2])
student.display_info()