Добавил геттер

This commit is contained in:
Роман Жилкин 2025-03-07 13:32:46 +03:00
parent 85673af84f
commit a00f2a435e

3
app.py
View file

@ -12,5 +12,8 @@ class Teacher(Person):
def __init__(self, name, age): def __init__(self, name, age):
super().__init__(name, age) super().__init__(name, age)
def getter(self):
return self.name
print("Привет!") print("Привет!")