🍅 Akademi OOP Python
Kursus Pengekodan Interaktif 30 Minit
XP: 0/500
Pelajaran 1 – Membuat Kelas
Kelas ialah pelan tindakan untuk objek.
Contoh
class Dog:
pass
Cabaran: Buat kelas yang dipanggil Anjing.
Pelajaran 2 – Mencipta Objek
Buat objek bernama my_dog daripada kelas Dog.
Pelajaran 3 – Pembina
Buat kaedah __init__ dengan parameter nama.
Lesson 4 – Methods
Create a bark() method.
Lesson 5 – Inheritance
Create a Dog class that inherits from Animal.
🏆 Congratulations!
You completed the Python OOP Academy.
Topics Mastered:
- Classes
- Objects
- Constructors
- Attributes
- Methods
- Inheritance
