Python Day #14: Stop Struggling with Python OOP: Understand Classes and Objects in Minutes
Learn Object-Oriented Programming in Python using Turtle. Master classes, objects, methods, and properties with easy visuals and beginner-friendly examples.
Welcome to your introduction to Object-Oriented Programming, we can just refer to this as OOP. This concept will take your programming skills to the next level!
If you’ve been following along with our Roadmap to Python Series, you’ve already learned so much, so well done! I’ve made sure that this entire series builds to give you the real skills and logical thinking skills you need to form a solid foundation.
We’ve worked through the basics, into managing flow and reusable code. The last few lessons were dedicated to helping you break into understanding and using data structures in Python.
To be honest, at this point in the process, you have a real good understanding of the basics of programming overall. You have the skills you need and you’ve been learning to think like a developer along the way too.
It’s now time to get you thinking about larger scale programs and code as a whole. In these next lessons you are going to learn concepts that will set you apart from a beginner to get you thinking like an actual developer.
Every week you’ll be introduced to a new topic in Python, think of this as a mini starter course to get you going and allow you to have a structured roadmap that actually builds to create you a solid foundation in Python. Join us today!
Object-oriented programming is truly used in most applications whether you relaise it or not. Most of the things you will actually do in Python will require knowledge of how this works.
This is because even if you don’t build out your own projects to include OOP, the libraries and frameworks you will use in your projects are built around these concepts. This will allow you to truly understand what is happening and how to properly use them in our programs.
Over the last 8+ years I’ve been teaching full-time around the world which has given me the unique opportunity to work with over 1,500+ students. The last four years I’ve been teaching Python full-time. Breaking down complex topics, step by step.
I’ve spent this time curating a structured learning path that ensures my students have the greatest chance of success and don’t just learn but actually master Python as well as their logical thinking and problem solving.
In this article, you’re going to be introduced to OOP concepts from the bottom. This lesson is designed to get you thinking about OOP and objects but not have you feel overwhelmed. If you understand the lesson today, the following lessons you’ll pick up faster.
One point I should note is, spend time digesting these when I write them, after six weeks most of my posts are automatically put behind a paywall.
If you haven’t subscribed to my premium content yet, you should definitely check it out. You unlock exclusive access to all of these articles and all the code that comes with them, so you can follow along!
Plus, you’ll get access to so much more, like monthly Python projects, in-depth weekly articles, the '3 Randoms' series, and my complete archive!
I spend a lot of my week on these articles, so if you find it valuable, consider joining premium. It really helps me keep going and lets me know you’re getting something out of my work!
Thank you for allowing me to do work that I find meaningful. This is my full-time job so I hope you will support my work by joining as a premium reader today.
If you’re already a premium reader, thank you from the bottom of my heart! You can leave feedback and recommend topics and projects at the bottom of all my articles.
👉 I genuinely hope you get value from these articles, if you do, please help me out, leave it a ❤️, and share it with others who would enjoy this. Thank you so much!
P.S - Drop any questions in the comments or feel free to DM me directly as I’m always happy to help you guys out.
What the heck is Turtle?
This may seem like a kids module, but I assure you it’s not. Learning this module will allow you to tackle the concepts of OOP so much faster than your peers.
The Python Turtle module is a built-in graphics module that gives us a simple way to create drawings and animations. At its core, the turtle
module is a virtual "turtle" or object that can be commanded to move around a screen, leaving a trail behind it. This trail forms lines that can lead to more complex drawings.
The reason we are using this is for the immediate visual feedback provided by the turtle
module. This is one of the greatest tools for learning fundamental programming concepts and ease your way into Object-oriented programming.
👉 I genuinely hope you get value from these articles, if you do, please help me out, leave it a ❤️, and share it with others who would enjoy this. Thank you so much!
The Essence of Object-Oriented Programming
Before we jump right into Turtle and writing out our own code, I’d like to cover some new key terms that we are going to use going forward. You should drill these terms in so anytime you see them, you’ll automatically know what they are referencing.
These new terms are going to be: Classes, Objects, Methods, and Properties.
Class: A blueprint for creating objects. Objects are collections of data (properties) and behaviors (functions/methods) that are grouped together. You can think of a class similar to a folder for these.
Object: Is a real, usable version of the blueprint (the class). These objects are what’s known as an “instance” or an “example” of the class and allow us to use the inner components of the class.
Method: A method is just a function that is inside a class. It is the behavior for an object and to use a method (function) they must be linked to an object from the class.
Property: A property is simply a variable in a class. These are the attributes you can give to an object of a certain class.
Everything in Python is essentially built on the terms that I touched on above. But learning how to creating these and use these can sometimes feel overwhelming.
We want to break this down so first you can see it in action. What do I mean by an object? Or how can I assign a specific object certain behavior and personality?
👉 I genuinely hope you get value from these articles, if you do, please help me out, leave it a ❤️, and share it with others who would enjoy this. Thank you so much!
Ready to Go From Zero to Confident in 90 Days?
Most people get stuck before they even start…
They waste hours Googling, watching random YouTube videos, and never actually finish a project. But that doesn’t have to be you.
I’ve built The Python Masterclass to take you from “I don’t know where to start” to “I can build real-world Python projects” — in less than 90 days.
👉 I’m giving you my exact system that’s been proven and tested by over 1,500 students over the last 4+ years!
Here’s what you’ll get when you join today:
✅ All Course Videos — Learn Python without wasting time on scattered tutorials
✅ Python Templates & eBooks — Pre-built scripts, guides, and checklists
✅ How to Build a Portfolio - Mini Course — Learn the 5 step process ✅ Bi-monthly Live Q&A Calls (Pro/Elite) — Get answers in real time
✅ Portfolio/CV Reviews (Pro/Elite) — Tailored feedback to help you land work
✅ Personal Onboarding, Fast Support, & Custom Feedback (Elite) — I’ll personally guide to keep you moving
✅ Access The Nerd Nook premium FREE (Pro/Elite) — Stay ahead with insider tips
My masterclass is designed so you see your first win in just 7 days — you’ll build your first working Python scripts in week one and finish your first full project in your first month.
With just 30–45 minutes a day, you’ll be on your way to becoming a confident Python developer.
👉 Ready to get started?
P.S. — The sooner you start, the sooner you’ll have projects you can actually show to employers or clients. Imagine where you’ll be 90 days from now if you start today.
Working with Objects in Turtle
Before we design and craft out our own classes with objects. We are going to skip past building out our own classes fir bow. It’s important you see how working with objects gives our code and programs more ability to cover specific tasks.
This is where the Turtle module will begin to play into our learning. Below I have written some code that allows us to draw different pictures at the same time on our screen.
How do they draw different pictures? Well, each picture is using a “pencil” of its own. So you can think of each object as a differently colored pencil. They are all pencils, but they are different colors and they draw something different.
The first step in this is to import turtle, which comes with Python. Then you need to create objects to utilize. You can call these objects anything you’d like. For me here I have created two objects, t1
and t2
.
An object is a variable thats value is a class. A class is the only thing in Python that we capitalize. The turtle class has already been made for us, so this allows us to create objects and practice working with them as well as the properties and methods.
After I created two objects, I spent a moment to edited the attributes (properties) for each object. You can see that for object t1
, I gave it the color “orange” and the shape of a “turtle”. Then for object t2
, I gave it the color “blue” and the shape of a “triangle”.
Once you make and set the attributes to the objects, you can begin to give them behavior. This just means using the methods (functions) that are inside of the Turtle
class.
For object t1
, you can see that I made a for loop and I am telling the turtle to move forward 100, then turn left 90 degrees. This will have the t1
object draw an orange square on the screen.
Then for object t2
, I first move the object to a different starting point, then I tell the object to draw a solid blue circle. The above is the essences of turtle, but more importantly it shows how to define your own objects while giving them behavior and attributes of their own.
Spend some time on turtle, I recommend at least an hour own two. I promise that this will make everything so much more clear as we enter OOP. You should try to create a picture and use multiple objects to draw out the picture.
You can use all the previous code we have learned in our lessons. Try to wrtie a turtle program that draws a “cityscape”. Yes, a cityscape. I want you to try to incorporate conditional statements, loops, and your own functions in your program.
This will all better prepare you and give you the chance to really practice everything we have been covering in the whole series so far. Not only will you get the chance to practice what we have learned, but you’ll also get the chance to work with objects and start understanding object-oriented programming.
👉 I genuinely hope you get value from these articles, if you do, please help me out, leave it a ❤️, and share it with others who would enjoy this. Thank you so much!
My Best Starter Resources
Here are the best resources I have to offer to get you started with Python no matter your background! Check these out as they’re bound to maximize your growth in the field.
Code with Josh: This is my YouTube channel where I post videos every week designed to help break things down and help you grow.
Zero to Knowing: My Python Masterclass Subscription gives you everything you need to go from zero to building real-world projects — with new lessons, challenges, and support every month. Over 1,500+ students have already used this exact system to learn faster, stay motivated, and actually finish what they start.
My Books: Maybe you’re looking to get a bit more advanced in Python. I’ve written 3 books to help with that, from Data Analytics, to SQL all the way to Machine Learning.
Wrapping Up Lesson Fourteen
You just took your first real step into understanding Object-Oriented Programming, and that’s something to feel good about.
This lesson wasn’t just about drawing with Turtle—it was about showing you how Python organizes code in a way that makes things clearer and more manageable using things like classes, objects, methods, and properties.
Now that you’ve seen it in action, you can probably tell how OOP helps make your programs more organized and easier to work with. Instead of writing the same code over and over or building huge blocks of code that are hard to manage, you can start thinking in smaller, reusable pieces—kind of like how real developers do it.
And Turtle is a great tool for this. It gives you instant visual feedback, which helps make these ideas click. Don’t rush through it. The more time you spend messing around with Turtle, the more these concepts will start to make sense.
So here’s your challenge: take what you learned today and try to build your own little city using Turtle. Use loops to create shapes, use if-statements to make decisions, and try giving each object its own look and behavior. This is your time to get creative and really try out the stuff we’ve been covering.
In the next few lessons, we’ll start making our own custom classes and go deeper into what makes OOP so powerful. That’s when things start to really get interesting.
And hey—if this article helped you out, think about becoming a premium reader. You’ll get full access to every lesson, all the code examples, and a bunch of real-world Python projects that can really help you level up.
Let’s keep moving forward with Day #15 next week.
Hope you all have an amazing week nerds ~ Josh (Chief Nerd Officer 🤓)
👉 If you’ve been enjoying these lessons, consider subscribing to the premium version. You’ll get full access to all my past and future articles, all the code examples, extra Python projects, and more.