Skip to main content
HomePythonObject-Oriented Programming in Python

Object-Oriented Programming in Python

Dive in and learn how to create classes and leverage inheritance and polymorphism to reuse and optimize code.

Comece O Curso Gratuitamente
4 Horas13 Videos44 Exercicios
76.339 AprendizesTrophyDeclaração de Realização

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.
GroupTreinar 2 ou mais pessoas?Experimente o DataCamp For Business

Loved by learners at thousands of companies


Descrição do Curso

Object-oriented programming (OOP) is a widely used programming paradigm that reduces development times—making it easier to read, reuse, and maintain your code. OOP shifts the focus from thinking about code as a sequence of actions to looking at your program as a collection of objects that interact with each other. In this course, you’ll learn how to create classes, which act as the blueprints for every object in Python. You’ll then leverage principles called inheritance and polymorphism to reuse and optimize code. Dive in and learn how to create beautiful code that’s clean and efficient!
Para Empresas

GroupTreinar 2 ou mais pessoas?

Obtenha acesso à biblioteca completa do DataCamp, com relatórios, atribuições, projetos e muito mais centralizados
Experimente O DataCamp for BusinessPara uma solução sob medida , agende uma demonstração.

Nas seguintes faixas

Desenvolvedor Python

Ir para a trilha

Programação Python

Ir para a trilha
  1. 1

    OOP Fundamentals

    Grátis

    In this chapter, you'll learn what object-oriented programming (OOP) is, how it differs from procedural-programming, and how it can be applied. You'll then define your own classes, and learn how to create methods, attributes, and constructors.

    Reproduzir Capítulo Agora
    What is OOP?
    50 xp
    OOP termininology
    100 xp
    Exploring object interface
    100 xp
    Class anatomy: attributes and methods
    50 xp
    Understanding class definitions
    100 xp
    Create your first class
    100 xp
    Using attributes in class definition
    100 xp
    Class anatomy: the __init__ constructor
    50 xp
    Correct use of __init__
    50 xp
    Add a class constructor
    100 xp
    Write a class from scratch
    100 xp
  2. 2

    Inheritance and Polymorphism

    Inheritance and polymorphism are the core concepts of OOP that enable efficient and consistent code reuse. Learn how to inherit from a class, customize and redefine methods, and review the differences between class-level data and instance-level data.

    Reproduzir Capítulo Agora
  3. 3

    Integrating with Standard Python

    In this chapter, you'll learn how to make sure that objects that store the same data are considered equal, how to define and customize string representations of objects, and even how to create new error types. Through interactive exercises, you’ll learn how to further customize your classes to make them work more like standard Python data types.

    Reproduzir Capítulo Agora
  4. 4

    Best Practices of Class Design

    How do you design classes for inheritance? Does Python have private attributes? Is it possible to control attribute access? You'll find answers to these questions (and more) as you learn class design best practices.

    Reproduzir Capítulo Agora
Para Empresas

GroupTreinar 2 ou mais pessoas?

Obtenha acesso à biblioteca completa do DataCamp, com relatórios, atribuições, projetos e muito mais centralizados

Nas seguintes faixas

Desenvolvedor Python

Ir para a trilha

Programação Python

Ir para a trilha

Colaboradores

Collaborator's avatar
Amy Peterson
Collaborator's avatar
Maggie Matsui

Pre Requisitos

Writing Functions in Python
Alex Yarosh HeadshotAlex Yarosh

Curriculum Developer @ Cockroach Labs

Veja Mais

O que os outros alunos têm a dizer?

Cadastre-se mais 13 milhões de alunos e comece Object-Oriented Programming in Python Hoje!

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.