MISSION 39

Object-Oriented Programming

So far, you have learned a system of programming known as Procedural Programming. In its simplest definition, procedural programming involves writing code in a number of sequential steps — and sometimes you'll combine these steps into commands called functions.

To start off this Python Programming Advanced course, you will begin by learning a paradigm of coding known as object-oriented programming. Rather than code being designed around sequential steps, it is instead defined around objects.

When working with data, it's much more common to use a style that is closer to procedural programming style than object-oriented programming, but it's very important to understand how object-oriented programming works, because Python is an object-oriented language.

This means almost everything in Python is actually an object; when you're working with Python, you are creating and manipulating objects. As you continue to learn to work with data in Python, you'll encounter objects everywhere: 

  • NumPy and pandas: The two libraries essential to working with data in Python — both define a number of their own object types.
  • Matplotlib: Which you use to create data visualizations — uses object types to define the charts you create.
  • Scikit-learn: Which you use to create machine learning models — uses object types to represent the models you train and make predictions with. 

While it's much less common for data scientists and data analysts to define new types of objects, you'll be using objects all the time. Understanding how objects work allows you to better understand what is happening behind the scenes as you work with data.

Objectives

  • Learn how to create a class.
  • Learn how to use instance methods.
  • Learn about inheritence, an important concept in object-oriented programming.

Mission Outline

1. Solving Problems with Code
2. Defining Custom Classes
3. More Interesting Instance Properties
4. Instance Methods
5. Class Methods
6. Understanding Inheritance
7. Overloading Inherited Behavior
8. Comparing Average Ages
9. Oldest NBA Team
10. Conclusion
11. Takeaways

python-programming-advanced

Course Info:

Intermediate

The median completion time for this course is 6.9 hours. View Details

This course requires a premium subscription. This course includes five missions.  It is the 27th course in the Data Scientist in Python path.

START LEARNING FREE

Take a Look Inside