Jupyter Notebook Lab — Module 07#

Classes & Object-Oriented Programming

Practice defining Python classes, creating objects, and calling methods. You’ll build a Customer class from scratch and extend it to model a real customer portfolio.


Download#

📓 Student Notebook .ipynb 🔑 Answer Key coming soon

Open the .ipynb file in Google Colab by selecting File → Upload notebook.


What You’ll Practice#

  1. Defining a class with __init__ and instance attributes
  2. Adding methods for purchase tracking and tier classification
  3. Creating and using object instances
  4. Building a portfolio of objects and processing them with a shared interface
  5. Extending a class with new methods

Learning Objectives#

By completing this notebook you will be able to:

  • Define a class with __init__, instance attributes, and methods
  • Create object instances and access their attributes and methods
  • Understand the role of self in class method definitions
  • Recognize why libraries like Pandas and Matplotlib use an object-oriented design
  • Read and interpret class-based code in professional analytics scripts

Next Module: Module 08 — Files, APIs & Data Ingestion →