listing constructor with default values #ex py #class declaration class jungle#constructor with default values def __init__(selfname="unknown")self visitorname name def welcomemessage(self)print("hello % welcome to the jungleself visitorname create object of class jungle jungle("meher" welcomemessage(hello meherwelcome to the jungle if no name is passedthe default value unknown will be used jungle( welcomemessage(hello unknownwelcome to the jungle define 'mainfunction the above code can be written in 'mainfunction (lines - using standard-boiler-plate (lines - )which makes the code more readableas shown in listing this boiler-plate tells the python-interpretor that the 'mainis the starting point of the code listing main function #ex py #class declaration class jungle#constructor with default values def __init__(selfname="unknown")self visitorname name def welcomemessage(self)print("hello % welcome to the jungleself visitorname def main()create object of class jungle jungle("meher" welcomemessage(hello meherwelcome to the jungle if no name is passedthe default value unknown will be used jungle( welcomemessage(hello unknownwelcome to the jungle standard boilerplate to set 'mainas starting function if __name__=='__main__'main( keep classes in separate file to make code more manageablewe can save the class-code ( class jungleand application-files ( mainin separate file for thissave the class code in 'junglebook pyfileas shown in listing whereas save the 'main()in 'main pyfile as shown in listing sinceclass is in different file nowtherefore we need to import the class to 'main py fileusing keyword 'importas shown in line of listing object oriented programming