 
                 
                InterviewSolution
 Saved Bookmarks
    				| 1. | How do you implement abstract method in Python? Give an example for the same. | 
| Answer» Abstract method : An unimplemented method is an abstract method. When an abstract method is declared in a base class, the driven class has to either define the method or raise” Nothlmplemented Error” class Shape (object): def findArea (self): pass class Square (Shape): def_ init_(self, side): self, side = side def find Area (self): return self.side*self.side Note: We can use @ abstract method to enable parent class method to be executed. | |