diff --git a/diy2-test.py b/diy2-test.py index c49b98a..5452f4f 100644 --- a/diy2-test.py +++ b/diy2-test.py @@ -12,7 +12,9 @@ class Dog: # 狗类 class Husky(Dog): # 哈士奇类 def __init__(self): - + super().__init__() + self.skin = "black" coco = Husky() -print(coco.skin) \ No newline at end of file +print("coco是"+coco.skin+"色的,它有"+str(coco.footNum)+"条腿,"+str(coco.eyeNum)+"个眼睛"+str(coco.head)+"个头,"+str(coco.earsNum)+"个耳朵") +print(coco.run()) \ No newline at end of file diff --git "a/\343\200\202.py" "b/\343\200\202.py" index 17d6712..8bcfa25 100644 --- "a/\343\200\202.py" +++ "b/\343\200\202.py" @@ -1 +1,100 @@ -................................................................................................................................ \ No newline at end of file +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +10 10 +11 11 +12 12 +13 13 +14 14 +15 15 +16 16 +17 17 +18 18 +19 19 +20 20 +21 21 +22 22 +23 23 +24 24 +25 25 +26 26 +27 27 +28 28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 \ No newline at end of file