Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Create the Pet class and have it inherit from the object class.
- class Pet(object):
- # Create constructor.
- def __init__(self, name):
- self._name = name
- # Create the Dog class and have it inherit from the object class.
- class Dog(Pet):
- # Create constructor.
- def __init__(self, fur = ""):
- # Try and append the constructor with the Pet class.
- Pet.__init__(self, name):
- self._fur = fur
Advertisement
Add Comment
Please, Sign In to add comment