Commit 787a67f4 by BellCodeEditor

auto save

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