Skip to main content

Ben Bolstad has completed

Working with the Class System in Python

Start course For Free
4 hours
3,600 XP
Statement of Accomplishment Badge

Loved by learners at thousands of companies


Course Description

Object-oriented programming (OOP) is a powerful programming paradigm that reduces the complexity of systems as is employs heavy re-usability of code. OOP leverages the concept of objects and classes. Objects may contain data (known as attributes, stored as instance or class variables) as well as procedures (defined as methods). Objects are generated from blueprints known as classes, which specify the attributes and methods to be generated at the time of object instantiation. This course introduces the internals of classes and the utilization of objects, as well as important object-oriented programming fundamentals such as inheritance, polymorphism, and composition.
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more
Try DataCamp for BusinessFor a bespoke solution book a demo.
  1. 1

    Getting ready for object-oriented programming

    Free

    In this chapter we quickly review functions and data structures, as they are building blocks of object-oriented programming. Then we transition into the conceptual definition of objects and classes.

    Play Chapter Now
    Intro to Object Oriented Programming in Python
    50 xp
    Understanding Object Dependencies
    50 xp
    Creating functions
    100 xp
    Creating a complex data type
    100 xp
    Introduction to NumPy Internals
    50 xp
    What are NumPy Arrays most similar to?
    50 xp
    Create a function that returns a NumPy array
    100 xp
    Introduction to Objects
    50 xp
    Creating a class
    100 xp
    Difference between a class and an object
    50 xp
  2. 4

    Inheritance, polymorphism and composition

    In this chapter we cover inheritance, which is when we create a class that employs (or 'inherits') all class variables and methods from a 'parent' class. We also cover polymorphism, which is when multiple classes inherit from a single class. Finally, we cover composition, which is when classes employ specific class functionality from other classes without necessarily inheriting from them.

    Play Chapter Now
For Business

GroupTraining 2 or more people?

Get your team access to the full DataCamp library, with centralized reporting, assignments, projects and more

Datasets

US Life Expectancymtcars

Collaborators

Collaborator's avatar
David Campos
Collaborator's avatar
Shon Inouye
DataCamp Content Creator

Course Instructor

DataCamp offers interactive R, Python, Spreadsheets, SQL and shell courses. All on topics in data science, statistics, and machine learning. Learn from a team of expert teachers in the comfort of your browser with video lessons and fun coding challenges and projects.
See More

Join over 13 million learners and start Working with the Class System in Python today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.