RANIARANIA Academy

Object-Oriented Programming in Python

Learn to model real problems with classes and objects in Python — __init__ and self, instance versus class attributes, encapsulation, inheritance with super(), polymorphism and the dunder methods that make objects feel native. This course builds the object-oriented foundations assessed by the Python Institute PCAP certification.

Watch the free preview

Defining a class with __init__ and self — free to watch, no account needed.

Python: Foundations INTERMEDIATE · 150 min · Certificate on completion · 3 CPD points

What you'll learn

  • Define classes with __init__ and self, and create objects from them
  • Distinguish instance attributes from class attributes and use each correctly
  • Encapsulate state using naming conventions and the property decorator
  • Build inheritance hierarchies with super() and override methods polymorphically
  • Implement dunder methods such as __str__, __repr__ and __add__ to integrate objects with Python

Syllabus

Classes & Objects — the Basics
Defining a class with __init__ and selfFree preview15 min
Instance attributes versus class attributes15 min
Encapsulation & Object Representation
Encapsulation with conventions and properties15 min
Object representation with __str__ and __repr__15 min
Inheritance & Polymorphism
Inheritance and super()15 min
Polymorphism and method overriding15 min
Dunder Methods & Composition
Operator overloading with dunder methods15 min
Composition — building objects from objects15 min
Lab — 10 Programming Exercises & Solutions
Programming Exercises 1–515 min
Programming Exercises 6–1015 min