What is the output of the following code? from abc import ABC, abstractmethod class A(ABC): @abstractmethod def m1(self): print('In class A, Method m1.') class B(A): @staticmethod def m1(self): print('In class B, Method m1.') b = B() B.m1(b)

Questions & AnswersCategory: Programming LanguageWhat is the output of the following code? from abc import ABC, abstractmethod class A(ABC): @abstractmethod def m1(self): print('In class A, Method m1.') class B(A): @staticmethod def m1(self): print('In class B, Method m1.') b = B() B.m1(b)
Adam asked 3 years ago

What is the output of the following code?

from abc import ABC, abstractmethod

class A(ABC):

    @abstractmethod

    def m1(self):

        print('In class A, Method m1.')

class B(A):

    @staticmethod

    def m1(self):

        print('In class B, Method m1.')

b = B()

B.m1(b)

 
a. In class A, Method m1.
b. AttributeError
c. TypeError
d. In class B, Method m1.