Using Super() To Call Parent Method

Mon 10 August 2026
class Animal:
    def sound(self):
        print("Animal makes sound")

class Dog(Animal):
    def sound(self):
        super().sound()
        print("Dog barks")

d = Dog()
d.sound()
Animal makes sound
Dog barks


Score: 10

Category: chapter2_inheritance