Object-Oriented Programming in Python
To call the parent's class method instead of the current one, we use the_
super()_method in Python.
We create the
Cat object. The
super() method inside the
Cat object refers to the parent's
Animal constructor is called first.
Afterward, go back to the
Cat constructor, initialize the
age attribute and print the message.
The last output is:
Select the correct answer