Lesson 1: Python Review & OOP Preview
You already know variables, loops, functions, and lists. This course goes deeper. We'll cover object-oriented programming (OOP), working with external APIs, file I/O, error handling, and building real command-line tools.
Key Concepts
Recap: Python Fundamentals
Variables, lists, dicts, loops, if/else, and functions are your foundation. This lesson refreshes those concepts and shows how they connect to everything in this course.
What Is OOP?
Object-Oriented Programming organizes code around objects — bundles of data (attributes) and behavior (methods). A Dog object might have attributes name, breed, age and methods bark(), sit(), fetch().
Classes vs Objects
A class is the blueprint. An object (instance) is built from that blueprint. class Dog: defines what all dogs have in common. my_dog = Dog('Rex', 'Lab', 3) creates one specific dog.
Why OOP?
OOP makes large programs easier to organize, reuse, and debug. It mirrors how we think about the real world — a bank account, a user profile, a video game character — all natural candidates for classes.
✅ Check Your Understanding
1. In OOP, what is a class?
2. What is an object in OOP?
3. In class Dog, def bark(self): is called a: