🐍Python OOP 学院
30 分钟互动编码课程
经验值: 0/500
第 1 课 – 创建类
类是对象的蓝图。
例子
class Dog:
pass
挑战: 创建一个名为 Dog 的类。
第 2 课 – 创建对象
从 Dog 类创建一个名为 my_dog 的对象。
Lesson 3 – Constructors
Create an __init__ method with a name parameter.
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
