Зміст курсу
Object-Oriented Programming in Python
Object-Oriented Programming in Python
1. Classes and Objects
2. Encapsulation
3. Inheritance
4. Polymorphism
Challenge
Завдання
Swipe to start coding
- Create the
Cat
class:
- Set
info
andmake_sound
methods inside theCat
class; - Inside the
make_sound
method print'Meow'
.
- Create the
Dog
class:
- Set
info
andmake_sound
methods inside theDog
class; - Inside the
make_sound
method print'Bark'
.
- Create
cat
anddog
objects based on theCat
andDog
classes respectively.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 4. Розділ 2
Challenge
Завдання
Swipe to start coding
- Create the
Cat
class:
- Set
info
andmake_sound
methods inside theCat
class; - Inside the
make_sound
method print'Meow'
.
- Create the
Dog
class:
- Set
info
andmake_sound
methods inside theDog
class; - Inside the
make_sound
method print'Bark'
.
- Create
cat
anddog
objects based on theCat
andDog
classes respectively.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 4. Розділ 2