← Questions

Inheritance, polymorphism, constructors and destructors

0
AmazonCodingLast asked Jan 2026

Explain the difference between inheritance and polymorphism, then write a short example in which a child class overrides a method of its parent. Next, compare constructors and destructors. Follow-up: does Python have destructors, and when does one run?

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding