Commit 23195321 by BellCodeEditor

save project

parent b62aefe6
Showing with 5 additions and 1 deletions
...@@ -6,12 +6,15 @@ class Cat: ...@@ -6,12 +6,15 @@ class Cat:
self.earsNum = 2 # 耳朵 self.earsNum = 2 # 耳朵
self.skin = "black" self.skin = "black"
self.name = '撒逼' self.name = '撒逼'
self.1 = ['老鼠','老八','老师','老屎']
def run(self): def run(self):
print("小猫"+self.name+"飞快的跑起来") print("小猫"+self.name+"飞快的跑起来")
def skill(self,name_): def skill(self,name_):
if name_ in self.1:
print('小猫'+self.name+'抓住了'+name_) print('小猫'+self.name+'抓住了'+name_)
else:
print('小猫'+self.name+'没抓住'+name_)
role = Cat() role = Cat()
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