Question

What will be the output of the following code snippet? class Animal:     def sound(self):         return "Some sound" class Dog(Animal):     def sound(self):         return "Bark" dog = Dog() print(dog.sound())

A Some sound
B Bark
C Dog
D None
E Animal
Practice Next

Relevant for Exams:

Hey! Ask a query