Programming Medium

Python: Object-Oriented Programming

Object-oriented programming in Python is both familiar and uniquely Pythonic. This quiz covers classes, instances, inheritance, polymorphism, and the special methods (dunder/magic methods) that make Python's OOP system so flexible.

Questions range from the basics of defining classes and using __init__ to more advanced topics like multiple inheritance, method resolution order (MRO), @classmethod, @staticmethod, and @property. These are the building blocks of every major Python framework and library.

Whether you're building your own classes or working with existing frameworks, a solid understanding of Python OOP will make your code cleaner, more reusable, and easier to maintain.

Start quiz → Opens in a new tab on Cletica

What This Quiz Covers

  • Classes and instances: __init__, self, and instance variables
  • Inheritance: single and multiple inheritance, super()
  • Method Resolution Order (MRO) and the C3 linearization algorithm
  • Encapsulation: public, protected (_), and private (__) attributes
  • Polymorphism: method overriding and duck typing
  • @classmethod, @staticmethod, and @property decorators
  • Dunder methods: __str__, __repr__, __len__, __eq__, __add__
Sample questions3 of 10 shown
Q1
What is the purpose of the __init__ method in a Python class?
Q2
What does super() do in Python?
Q3
Which decorator turns a method into one that can be called on the class itself, not just instances?
Answer all 10 questions on Cletica →

Cletica

Want to create your own quiz?

Build surveys and quizzes, share with anyone, collect responses — free to start.

Try Cletica for free →