Question OOP-INH-0026
EasyWhich Python syntax makes Dog inherit from Animal?
- A.
class Dog inherits Animal:
- B.
class Dog : Animal
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Inheritance question
Which Python syntax makes Dog inherit from Animal?
class Dog inherits Animal:
class Dog : Animal
Sign up free to see the answer and a step-by-step explanation.
class Dog extends Animal:
class Dog(Animal):