Commit 79888985 by BellCodeEditor

auto save

parent 64f46ca9
Showing with 36 additions and 4 deletions
class Dog: # 狗类 ="black"
coco = Husky()class Dog: # 狗类
def __init__(self): def __init__(self):
self.footNum = 4 # 腿 self.footNum = 4 # 腿
self.eyeNum = 2 # 眼睛 self.eyeNum = 2 # 眼睛
...@@ -13,7 +15,5 @@ class Dog: # 狗类 ...@@ -13,7 +15,5 @@ class Dog: # 狗类
class Husky(Dog): # 哈士奇类 class Husky(Dog): # 哈士奇类
def __init__(self): def __init__(self):
super().__init__() super().__init__()
self.skin="black" self.skin
coco = Husky()
print(coco.skin) print(coco.skin)
\ No newline at end of file
class cat():
def __init__(self):
super().__init__()
self.skin
coco = Husky() # 曹嘉狗类
def __init__(self):
self.footNum = 8 # 曹腿
self.eyeNum = 9 # 曹眼睛
self.head = 3 # 曹头
self.earsNum = 6 # 曹耳朵
self.skin = "red"
def run(self):
print("狗狗飞快的跑起来")
print(coco)
\ No newline at end of file
import random
wu=["武装直升机","防空导弹","坦克","战略核武器","高超音速导弹","特种部队","主战坦克连"]
w=["武装直升机","防空导弹","坦克"]
player=input("普通武器:武装直升机/防空导弹/坦克 超级武器:战略核武器/高超音速导弹/特种部队/主战坦克连,您派出:")
print("............")
print("红方派出"+player)
yyl=random.choice(w)
print("蓝方派出"+yyl)
print("............")
\ 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