Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Mammal:
- __kingdom = "animals"
- def __init__(self, name, type, sound):
- self.name = name
- self.type =type
- self.sound = sound
- def make_sound(self):
- return f'{self.name} makes {self.sound}'
- @staticmethod
- def get_kingdom():
- return Mammal.__kingdom
- def info(self):
- return f'{self.name} is of type {self.type}'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement