Commit 2866de85 by BellCodeEditor

save project

parent 61bc4a2e
Showing with 6 additions and 6 deletions
...@@ -4,11 +4,11 @@ class Hero: ...@@ -4,11 +4,11 @@ class Hero:
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
self.name=name self.name=name
def a(self):
self.level=self.level+1
self.hp=self.hp+20
self.attack=self.attack+5
yase=Hero("yase",300,40) yase=Hero("yase",300,40)
print(yase.name) print(yase.hp)
def a(): yase.a()
yase.level=yase.level+1
yase.hp=yase.hp+20
yase.attack=yase.attack+5
a()
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