15 lines
262 B
Python
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) # Прыгает ???? |