Search⌘ K

Challenge 1: Override a Method Using the Super Function

Explore how to override a method in a derived Python class and use the super function to call the original method from the base class. Gain hands-on practice with polymorphism by modifying code to combine outputs from base and derived methods for cleaner, modular design.

Problem statement

When a method in a derived class overrides a method in a base class, it is still possible to call the overridden method using the super() function.

If you write super().method() ...