"let's not get to selfish" Please help


class Animal(object):


class Animal(object):
def init(name):
self.name = name

Need Help!


class Animal(object):
    def __init__(self,name):
        self.name = name


even with indentation i don't get the output.
class Animal(object):
def init(self,name):
self.name = name

this is what shown in the console
File "python", line 7, in
TypeError: init() takes exactly 2 arguments (1 given)

please help friends


Rename your init() method to __init__(), that's special method to initialize instance of your class.

Your __init__() method takes name as argument. You forgot to pass name of animal in parentheses.

my_animal = Animal("John")


thnk you I've rectified it