Commit d0677531 by BellCodeEditor

save project

parent 365bdf79
Showing with 7 additions and 0 deletions
...@@ -6,5 +6,12 @@ class Hero: ...@@ -6,5 +6,12 @@ class Hero:
self.attack = attack self.attack = attack
yase = Hero('亚瑟',300,20) yase = Hero('亚瑟',300,20)
def shengji():
yase.level +=1
yase.hp += 50
yase.attack+=4
shengji()
print(yase.name,yase.hp,yase.attack) print(yase.name,yase.hp,yase.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