Oops, try again. It looks like you didn't add an __init__() function to your Animal class


#1

Here is my code:

class Animal(object):
"""A class that describes various types of Animals."""
def /t_init/t_(self):
pass
when i run this code, it is generating an error
Oops, try again. It looks like you didn't add an init() function to your Animal class.

please help me in resolving this and move


#2

try this code :

class Animal(object):
    def __init__(self):
        pass

i test it, ran without no error.


Oops, try again. It looks like the value you printed isn't correct
#3

Got it. Thanks!
two underscores before & after init init


#4

The init function or called constructor in pure OOP terms belongs to a special class of functions in Python called magic methods and is very handy in creating large applications.