Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge | Polymorphism
Object-Oriented Programming in Python
course content

Conteúdo do Curso

Object-Oriented Programming in Python

Object-Oriented Programming in Python

1. Classes and Objects
2. Encapsulation
3. Inheritance
4. Polymorphism

Challenge

Tarefa

  1. Create the Cat class:
  • Set info and make_sound methods inside the Cat class;
  • Inside the make_sound method print 'Meow'.
  1. Create the Dog class:
  • Set info and make_sound methods inside the Dog class;
  • Inside the make_sound method print 'Bark'.
  1. Create cat and dog objects based on the Cat and Dog classes respectively.

Tarefa

  1. Create the Cat class:
  • Set info and make_sound methods inside the Cat class;
  • Inside the make_sound method print 'Meow'.
  1. Create the Dog class:
  • Set info and make_sound methods inside the Dog class;
  • Inside the make_sound method print 'Bark'.
  1. Create cat and dog objects based on the Cat and Dog classes respectively.

Tudo estava claro?

Seção 4. Capítulo 2
toggle bottom row

Challenge

Tarefa

  1. Create the Cat class:
  • Set info and make_sound methods inside the Cat class;
  • Inside the make_sound method print 'Meow'.
  1. Create the Dog class:
  • Set info and make_sound methods inside the Dog class;
  • Inside the make_sound method print 'Bark'.
  1. Create cat and dog objects based on the Cat and Dog classes respectively.

Tarefa

  1. Create the Cat class:
  • Set info and make_sound methods inside the Cat class;
  • Inside the make_sound method print 'Meow'.
  1. Create the Dog class:
  • Set info and make_sound methods inside the Dog class;
  • Inside the make_sound method print 'Bark'.
  1. Create cat and dog objects based on the Cat and Dog classes respectively.

Tudo estava claro?

Seção 4. Capítulo 2
toggle bottom row

Challenge

Tarefa

  1. Create the Cat class:
  • Set info and make_sound methods inside the Cat class;
  • Inside the make_sound method print 'Meow'.
  1. Create the Dog class:
  • Set info and make_sound methods inside the Dog class;
  • Inside the make_sound method print 'Bark'.
  1. Create cat and dog objects based on the Cat and Dog classes respectively.

Tarefa

  1. Create the Cat class:
  • Set info and make_sound methods inside the Cat class;
  • Inside the make_sound method print 'Meow'.
  1. Create the Dog class:
  • Set info and make_sound methods inside the Dog class;
  • Inside the make_sound method print 'Bark'.
  1. Create cat and dog objects based on the Cat and Dog classes respectively.

Tudo estava claro?

Tarefa

  1. Create the Cat class:
  • Set info and make_sound methods inside the Cat class;
  • Inside the make_sound method print 'Meow'.
  1. Create the Dog class:
  • Set info and make_sound methods inside the Dog class;
  • Inside the make_sound method print 'Bark'.
  1. Create cat and dog objects based on the Cat and Dog classes respectively.

Seção 4. Capítulo 2
Mude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
We're sorry to hear that something went wrong. What happened?
some-alt