What is the output of the following code? class A: @classmethod def getC(self): print('In Class A, method getC.') class B(A): pass b = B() B.getC() b.getC()

Questions & AnswersCategory: Programming LanguageWhat is the output of the following code? class A: @classmethod def getC(self): print('In Class A, method getC.') class B(A): pass b = B() B.getC() b.getC()
Adam asked 2 years ago

What is the output of the following code?

class A:

    @classmethod

    def getC(self):

        print('In Class A, method getC.')

class B(A):

    pass

b = B()

B.getC()

b.getC()

 
a. AttributeError
b. In Class A, method getC, In Class A, method getC.
c. In Class A, method getC.
d. TypeError