Classes and objects

Bundle data with the code that uses it.

A class is a blueprint and an object is one thing built from it. __init__ runs when an object is created, and self means this particular object.

Expected output
Meena 500

Inheritance

A child class reuses its parent and changes only what differs.

Expected output
Anu Staff
Karthik Mentor
โ† Errors and filesPython quick reference โ†’