Commit 3d2affdf by BellCodeEditor

save project

parent 6029ccff
Showing with 3 additions and 2 deletions
...@@ -4,13 +4,14 @@ class a: ...@@ -4,13 +4,14 @@ class a:
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
self.name=name self.name=name
def e():
def e(self):
self.level=self.level+1 self.level=self.level+1
self.hp=self.hp+1000 self.hp=self.hp+1000
self.attack=self.attack+300 self.attack=self.attack+300
yase=a("yase",300,2) yase=a("yase",300,2)
houyi=a("houyi",400,6) houyi=a("houyi",400,6)
yase.e() houyi.e()
print(yase.hp) print(yase.hp)
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