OOP – Inheritance (basic)
A child class inherits methods and attributes from a parent class by naming it in parentheses
What it does: Dog gets all of Animal's methods and attributes automatically. super().__init__() sets up the parent's attributes in the child. Inheritance lets a child class reuse all the code already written in the parent. The class in parentheses is the parent — Dog inherits from Animal. super() gives you a reference to the parent class so you can call its methods. Child classes inherit all parent methods without needing to copy them. Defining speak() in Dog replaces the inherited version — called method overriding. isinstance() returns True for the object's class AND all its parent classes.
Common mistakes: Should call super().__init__(name) to use the parent's initialization. Parent's __init__ expects name must pass it: super().__init__(name).
Free printable worksheet with full answer key — or add this module to a journey and assign it to your class.
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
InheritanceFill in the Blanks
Spot the Error
Create a free class, add this module to a journey, and track who's stuck.
Create a free teacher account →No credit card. No setup fee. Make a class and invite students in under three minutes.
Practice this topic interactively, track progress, and unlock badges.
Start Learning Free →