Method Overriding: Changing inherited behavior

Easy Advanced Inheritance & MRO
Solve in Playground →

Problem Statement

Create a base class `Animal` with a method `make_sound(self)` that prints ‘Some sound’. Create a derived class `Dog` that inherits from `Animal` but overrides `make_sound(self)` to print ‘Woof’. Instantiate a `Dog` and call its `make_sound` method.

Input Format

None

Output Format

Print the overridden sound.

Constraints

None

Sample Output

Woof

Explanation

Method overriding allows a child class to provide a specific implementation of a method that is already provided by its parent class.

Starter Code

class Animal:
    def make_sound(self):
        print('Some sound')

class Dog(Animal):
    # Override make_sound here
    pass

if __name__ == '__main__':
    # Instantiate Dog and call make_sound
    pass

Limits

  • Time Limit: 1s
  • Memory Limit: 256MB

Embedded C Programming

Updated: March 15, 2026
Intermediate

Embedded systems rely on efficient low-level programming to interact directly with hardware. In this course, you will learn how to write practical Embedded C programs used in real microcontroller-based systems. Rather than focusing only on theory, this course follows a practice-driven approach. Each lesson includes hands-on coding exercises that simulate real firmware development tasks used