Commit 92691c13 by BellCodeEditor

save project

parent 5b3c71df
Showing with 7 additions and 3 deletions
...@@ -4,8 +4,12 @@ class Hero: ...@@ -4,8 +4,12 @@ class Hero:
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
yase=Hero('yase',300,20) yase=Hero('yase',300,20)
houyi=Hero('hy',250,23) houyi=Hero('hy',250,23)
def Gtr():
print(yase.attack) yase.level=yase.level+1
print(houyi.attack) yase.hp=yase.hp+50
yase.attack=yase.attack+4
print(yase.level+1)
print Gtr()
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