methods and @property introduction in this we will understand the usage of 'methods''@propertyand 'descriptor methodsstaticmethod and classmethod in previous we saw the examples of methodse 'areaand 'costin listing inside the class without any decorator with them the 'decoratorsadds the additional functionality to the methodsand will be discussed in details in in this sectionwe will quickly review the different types of methods with an example then these methods will be used with our previous examples in the below codetwo decorators are used with the methods inside the class 'staticmethodand 'classmethodplease see the comments and noticehow do the different methods use different values of for adding two numbersnotewe can observe the following differences in these three methods from the below codemethod it uses the instance variable (self xfor additionwhich is set by __init__ function classmethod it uses class variable for addition staticmethod it uses the value of which is defined in main program ( outside the class if is not definedthen nameerror will be generated mehodsex py below will be used by static method if we do not define itthe staticmethod will generate error class add(object) class variable def __init__(selfx)self instance variable def addmethod(selfy)print("method:"self @classmethod as conventioncls must be used for classmethodinstead of self (continues on next page