CodeCubGet the app
🏗️

Classes & OOP

Object-oriented Python · 4 lessons

Model the world with objects: define classes and __init__, add methods, control how they print with __str__, and reuse behaviour via inheritance.

Practice this track with instant, on-device checks in CodeCub.

Get the app

Lessons in this track

  1. 1Classes & __init__
  2. 2Methods
  3. 3__str__
  4. 4Inheritance

How you'll be checked

Each lesson pairs a short explanation with 2–3 exercises, graded deterministically on your device:

🔮 Predict the output

Read a snippet and say exactly what it prints — the fastest way to build a mental model of how Python runs.

✏️ Fill the blank

Complete the missing token so the code does what the prompt asks. No syntax hand-holding.

🔢 Order the lines

Drag shuffled lines back into the sequence that produces the right result.

✅ Pick the answer

Choose the correct statement about behaviour, output or a concept.

← Previous track

📂 Files & Modules

Next track →

🔎 Regular Expressions

Learn Python — free app

Learn Python that sticks

54 tiny lessons with CodeCub

Get the app