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