Зміст курсу
Object-Oriented Programming in Python
Object-Oriented Programming in Python
1. Classes and Objects
2. Encapsulation
3. Inheritance
4. Polymorphism
Challenge
Завдання
- 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.
Завдання
- 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
Завдання
- 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.
Завдання
- 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
Завдання
- 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.
Завдання
- 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.
Все було зрозуміло?
Завдання
- 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
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів