Commit e0c17b4b by BellCodeEditor

save project

parent 787a67f4
Showing with 10 additions and 1 deletions
...@@ -5,6 +5,15 @@ class Hero: ...@@ -5,6 +5,15 @@ class Hero:
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
'''yase=Hero('yase',200,30) '''yase=Hero('yase',200,30)
yase.updata() yase.updata()
...@@ -13,7 +22,7 @@ print(yase.hp) ...@@ -13,7 +22,7 @@ print(yase.hp)
print(yase.attack) print(yase.attack)
houyi=Hero('houyi',300,20) houyi=Hero('houyi',300,20)
print(houyi.attack)''' print(houyi.attack)
def updata(self): def updata(self):
self.level=self.level+1 self.level=self.level+1
......
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