Commit 3b3a18fb by BellCodeEditor

save project

parent db28b3c7
Showing with 12 additions and 8 deletions
class Cat:
"""
class Dog:
def __init__(self):
self.footNum = 4 # 腿
self.eyeNum = 2 # 眼睛
......@@ -7,10 +8,13 @@ class Cat:
self.skin = "black"
def run(self):
print("小猫飞快的跑起来")
def skill():
??
print("狗狗飞快的跑起来")
class Husky(Dog):
def __init__(self):
super().__init__()
self.skin="black"
coco=Husky()
print(coco.skin)
role = Cat()
role.skill("老鼠")
\ No newline at end of file
role.skill("老鼠")
"""
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment