Courses/Advanced OOP

๐Ÿ›๏ธ Advanced OOP

Abstract Base Classes

Force subclasses to implement methods.

Inherit from ABC and decorate methods with @abstractmethod โ€” instantiating the base or a subclass that didn't implement it raises TypeError.

main.py
Output
Press Run to execute.
Expected output
16
cannot instantiate

Sign in to track your progress across lessons.