Skip to main content

Creating and Using Python Classes

Hands-On Lab


Photo of

Training Architect





As we work on more and more complex problems, we need to start creating custom types to have manageable models for the data we're working with. Python is an object-oriented programming language, and creating classes is something we will do frequently to solve problems using Python. In this hands-on lab, we'll define a custom class with some functionality and attributes that will allow us to model an Employee in our code. The script includes code that will utilize this class and provide us with some feedback to know if we've created a class that meets our requirements. To feel comfortable completing this lab, you'll want to know how to create and use Python classes (watch the "Creating and Using Python Classes" video from the Certified Associate in Python Programming Certification course).

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.