Question OOP-ABS-0009
MediumWhat is the output of this code?
from abc import ABC, abstractmethod
class Shape(ABC):
@abstractmethod
def area(self):
pass
try:
s = Shape()
print("Shape")
except TypeError:
print("Can't instantiate")
- A.
Can't instantiate
- B.
None
- C.
Sign up free to see the answer and a step-by-step explanation.