Commit 060b551d by BellCodeEditor

save project

parent e8a01652
Showing with 3 additions and 0 deletions
...@@ -11,5 +11,7 @@ class Cat: ...@@ -11,5 +11,7 @@ class Cat:
def skill(self,prey): def skill(self,prey):
print("小猫抓住了"+prey) print("小猫抓住了"+prey)
def eats(self,data):
print('小猫吃'+str(data)+'条鱼')
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