Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Bird:
- def __init__(self):
- print("brid is ready")
- def whoIsThis(self):
- print("BIRD")
- def swim(self):
- print("swim can faster")
- class Penguin(Bird):
- def __init__(self):
- super().__init__()
- print("Now penguin child class is ready")
- def whoIsThis(self):
- print("penguin")
- def swim(self):
- print("wim Faster")
- peggy = Penguin()
- peggy.whoIsThis()
- peggy.swim()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement