Question OOP-ABS-0036
EasyWhat is the output of this code?
from abc import ABC, abstractmethod
class Shape(ABC):
@abstractmethod
def area(self):
pass
class Sq(Shape):
def __init__(self, s):
self.s = s
def area(self):
return self.s * self.s
print(Sq(3).area())
- A.
None
- B.
Error
- C.
Sign up free to see the answer and a step-by-step explanation.