第1到3行:定義類別Animal,宣告函式「__init__」,函式「__init__」輸入參數為self與name,將name指定給物件變數self.name。 第4行:宣告一個類別Animal的物件,輸入「 ...
確定! 回上一頁