Commit 2f1835d9 by BellCodeEditor

save project

parent 2f3dfee8
Showing with 4 additions and 3 deletions
class Cat: class Cat:
def __init__(self): def __init__(self,name):
self.footNum = 4 # 腿 self.footNum = 4 # 腿
self.eyeNum = 2 # 眼睛 self.eyeNum = 2 # 眼睛
self.head = 1 # 头 self.head = 1 # 头
self.earsNum = 2 # 耳朵 self.earsNum = 2 # 耳朵
self.skin = "black" self.skin = "black"
self.name = '撒逼' self.name = name
self.a = ['老鼠','老八','老师','老屎'] self.a = ['老鼠','老八','老师','老屎']
def run(self): def run(self):
...@@ -16,6 +16,6 @@ class Cat: ...@@ -16,6 +16,6 @@ class Cat:
print('小猫'+self.name+'抓住了'+name_) print('小猫'+self.name+'抓住了'+name_)
else: else:
print('小猫'+self.name+'没抓住'+name_) print('小猫'+self.name+'没抓住'+name_)
role = Cat() role = Cat('撒逼')
role.skill("老鼠") role.skill("老鼠")
role.skill('张云坤') 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