Commit 7c2fc80b by BellCodeEditor

save project

parent 0966c79f
Showing with 9 additions and 2 deletions
......@@ -4,7 +4,14 @@ class Hero:
dog.hp=hp
dog.name=name
dog.attack=attack
yaze=Hero("鸭子",300,234)
qianyi=Hero("前蚁",500,1)
def u():
yaze.level=yaze.level+1
yaze.hp=yaze.hp+0
yaze.attack=yaze.attack+1
yaze=Hero("鸭子",1,1)
qianyi=Hero("前蚁",1,1)
u()
u()
print("yaze的攻击力:",yaze.attack)
print("qianyi的攻击力:",qianyi.attack)
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