Python Tutorial: Intro to Object Oriented Programming in Python 3

28 Feb 2020 · 4 min
3:40

In this segment of the tutorial, the instructor transitions from using NumPy arrays to introducing object‑oriented programming (OOP) as a way to build more complex data structures such as Pandas DataFrames. He explains why functions and standalone variables are insufficient when the same array needs to be created repeatedly or referenced across different parts of a program, and argues that classes provide a reusable template that bundles related variables (attributes/fields) and functions (methods). The talk defines OOP terminology—attributes, class variables, methods—and uses a cookie‑cutter metaphor to clarify the relationship between a class (the template) and its objects (the instantiated cookies). The instructor then demonstrates the basic syntax for declaring a class in Python 3, noting the optional parent‑class parameter used in Python 2 code, and shows how to instantiate an object (e.g., a Tyrannosaurus dinosaur) from the class. The segment ends with a promise of further examples and a preview of inheritance and polymorphism later in the course.

Chapters

More from Richie

youtube.com

#359 My Best Friend is AI with Valerie Tiberius, Professor of Philosophy at University of Minnesota

5mo ago
youtube.com

17.8% of the World Now Uses AI — And the Gap Is Widening | The Median #5

5mo ago
youtube.com

Create GPTs to Automate Go-To-Market Research

5mo ago
youtube.com

What Happened to Self-Driving Cars? #AI

5mo ago
youtube.com

Never Use AI For This #warning #AI #flights

5mo ago
youtube.com

Use AI Agents to Analyze Power Grid Optimization

5mo ago
youtube.com

This is how modern AI actually solves problems #AITrends #AI

5mo ago
youtube.com

How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

5mo ago
youtube.com

#358 How AI Agents Will Work While You Sleep | Ruslan Salakhutdinov, Professor at Carnegie Mellon

5mo ago
youtube.com

Build an AI‑driven Dashboard

5mo ago
youtube.com

What’s Broken in Labor Markets Today #datascience

5mo ago
See all content