human
I am working on the file "PythonBootCamp/Complete-Python-Bootcamp-master/.ipynb_checkpoints/Object Oriented Programming-checkpoint.ipynb".
The first task is:
Great! Notice how we used self. notation to reference attributes of the class within the method calls. Review how the code above works and try creating your own method
Inheritance
Inheritance is a way to form new classes using classes that have already been defined. The newly formed classes are called derived classes, the classes that we derive from are called base classes. Important benefits of inheritance are code reuse and reduction of complexity of a program. The derived classes (descendants) override or extend the functionality of base classes (ancestors).
Lets see an example by incorporating our rpevious work on the Dog class:
Can you write Python code for it?
 Give me a the Python code you requested?
assistant
#Here is the Python code you requested.

class Animal(object):
    def __init__(self):
        print "Animal created"

    def whoAmI(self):
        print "Animal"

    def eat(self):
        print "Eating"

class Dog(Animal):
    def __init__(self):
        Animal.__init__(self)
        print "Dog created"

    def whoAmI(self):
        print "Dog"

    def bark(self):
        print "Woof!"

d = Dog()

d.whoAmI()

d.eat()

d.bark()