the object 'jcan now use the function 'welcomemessageusing operatoras shown in line also'selfis used at line which is discussed in section section listing add function to class #ex py #class declaration class jungledef welcomemessage(self)print("welcome to the jungle" create object of class jungle jungle( welcomemessage(welcome to the jungle constructor the '__init__method is used to define and initialize the class variables this ''__init__method is known as constructor and the variables are known as attributes note thatthe self keyword is used in the 'init function(line along with the name of the variables (line further all the functionsshould have first parameter as 'selfinside the class although we can replace the word 'selfwith any other wordbut it is good practice to use the word 'selfas convention explanation listing wheneverthe object of class is create then all the attributes and methods of that class are attached to itand the constructor '__init__method is executed automatically herethe constructor contains one variable 'visitorname(line and one input parameter 'name(line whose value is initialized with 'unknownthereforewhen the object 'jis created at line the value 'meherwill be assigned to parameter 'nameand finally saved in 'visitornameas constructor is executed as soon as the object created furtherif we create the object without providing the name ' jungle()'then default value 'unknownwill be saved in attribute 'visitornamelastlythe method 'welcomemessageis slightly updatedwhich is now printing the name of the 'visitor(line as well object oriented programming