Skip to main content
To reinforce what you’ve learned about classes, objects, instance/class/static methods, encapsulation, inheritance, and method resolution order (MRO), practice with these interactive notebooks:

Follow-Along Practice

Practice defining classes, using __init__ initializers, creating instance/class/static methods, implementing encapsulation with protected and private variables, exploring name mangling, and implementing inheritance types.💻 VS Code | 🚀 Colab | 📥 Download

Practice Exercises

Test your knowledge by writing student blueprints, defining class attributes/methods, handling private fields safely, catching attribute errors, and creating subclasses with inheritance and MRO checks.💻 VS Code | 🚀 Colab | 📥 Download

What’s next?

Now that you have completed both functions and classes, let’s learn how to handle errors and exceptions in Python.

Exception Handling

Learn how to handle runtime errors gracefully