Commit e0c17b4b by BellCodeEditor

save project

parent 787a67f4
Showing with 13 additions and 4 deletions
......@@ -5,6 +5,15 @@ class Hero:
self.hp=hp
self.attack=attack
'''yase=Hero('yase',200,30)
yase.updata()
......@@ -13,9 +22,9 @@ print(yase.hp)
print(yase.attack)
houyi=Hero('houyi',300,20)
print(houyi.attack)'''
print(houyi.attack)
def updata(self):
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attack+40'''
\ No newline at end of file
self.hp=self.hp+50
self.attack=self.attack+40'''
\ No newline at end of file
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