Congratulations! You’ve now practiced using classes for object-oriented programming (OOP) in Python. Specifically, you can:
- Compose classes together
- Inherit and override behavior from other classes
- Creatively mix and match these approaches
With these skills to your name, you’re now ready to tackle creating complex systems and writing sleek, Pythonic code.
If you want to dive deeper, then these written tutorials are for you:
- Inheritance and Composition: A Python OOP Guide
- Supercharge Your Classes With Python
super()
- Data Classes in Python 3.7+ (Guide)
- Python’s
property()
: Add Managed Attributes to Your Classes - Providing Multiple Constructors in Your Python Classes
Or you can explore the following video courses:
- Inheritance and Composition: A Python OOP Guide
- Supercharge Your Classes With Python
super()
- Using Data Classes in Python
- Managing Attributes With Python’s property()
- Providing Multiple Constructors in Your Python Classes
- Getters and Setters in Python
- Class Concepts: Object-Oriented Programming in Python
- Inheritance and Internals: Object-Oriented Programming in Python
- Design and Guidance: Object-Oriented Programming in Python
OOP is a big topic, and Real Python has more resources to help you expand your skill set. There’s even a learning path that’ll help you solidly grasp the fundamentals of OOP so that you can make your programs easier to write and maintain.
To continue your Python learning journey, check out the other Python Basics courses. You might also consider getting yourself a copy of Python Basics: A Practical Introduction to Python 3.
Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.
alphafox28js on Dec. 1, 2023
Output of the 98% of Code that Works is below for 1 animal. Functional and was Fun.
All of the Pitbulls are living on the farm. The Pitbulls move with a bold pace. They eat fast. They speak forcefully. Most run with purpose, but some slow. The hyper Pitbulls of the Canine Family jumps over the lazy dogs, and into the None. At night the Pitbulls sleeps peacefully and wake up slowly. All of the Animals and Farmers couldn’t be more happy!
The farm has Rolling Hills, 25mph winds, and large scatterd trees. It sits in the open plains. The Animalia run around and play all day. When it is time to feed, the Animalia, run to the the red barn. They eat from the Field. and to the barn. The Field has 1/10 spaces filled.