python_rag_system/lesson_12/code/oop.py
2025-10-27 14:38:51 +03:00

15 lines
262 B
Python

class Mammal:
def move(self, x):
print('Двигается')
class Hare(Mammal):
def move(self, x, y ):
print('Прыгает')
animal = Mammal()
animal.move(100) # Двигается
hare = Hare()
hare.move(100) # Прыгает ????