Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Things:
- pass
- class Animate(Things):
- pass
- class Inanimate(Things):
- pass
- class Animals(Animate):
- def move(self):
- print('Двигается!')
- class Giraffes(Animals):
- def __init__(self, h):
- self.height = h
- def eat_leaves(self):
- print('Ем листья!')
- class Cats(Animals):
- def myau(self):
- print('Мяу!')
- Samson = Giraffes(5)
- Samson.height = 10
- print(Samson.height)
- Maks = Cats()
- Maks.myau()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement