
Already know some of this? A 2-minute test skips the lessons you know.
Take the placement testA free 7-lesson course built from Shradha Khapra's 57m of YouTube video. 1 day at 90 minutes a day, with study notes and a quiz in every lesson. A 2-minute placement test skips what you already know.
Taught by Shradha Khapra on YouTube. Videos play in YouTube's own player, so the creator keeps every view.
Define classes as blueprints with attributes, create objects (instances) from classes, and access instance attributes using dot notation.
Implement __init__ constructors to initialize object state, use the self parameter to reference the current instance, and pass arguments to customize each object.
Distinguish between instance attributes (unique per object) and class attributes (shared across all instances), and understand attribute lookup precedence.
Create instance methods that operate on object data using self, such as calculating average marks and printing welcome messages.
Define static methods with @staticmethod for class-level utilities that don't need self, and understand decorators as functions that modify other functions.
Build a Student class that accepts name and a list of marks, then implement a method to calculate and print the average score.
Explain abstraction as hiding implementation details and encapsulation as bundling data and methods together, reinforcing why classes organize code logically.