Commit cb37588c by BellCodeEditor

auto save

parent 83e1cac5
Showing with 7 additions and 4 deletions
......@@ -4,16 +4,19 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
self.abc()
def update(self):
self.level = self.level+1
self.hp = self.hp+114
self.attack = self.attack+56
self.abc()
def abc(self):
print(self.level,self.hp,self.attack)
a=Hero('yase',300,20)
print(a.attack)
a.update()
a.update()
a.update()
a.update()
print(a.attack)
\ No newline at end of file
a.update()
\ 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