Commit b1483f95 by BellCodeEditor

auto save

parent 97dfa2e0
Showing with 5 additions and 12 deletions
class Hero: class Hero:
def __init__(self,name,hp,attack): def __init__(self):
self.level=1 self.level=1
self.name=name self.hp=200
self.hp=hp self.attack=40
self.attack=attack
def fkl(self): yase = Hero()
self.level=self.level+1
self.hp=self.hp+10
self.attack=self.attack+100
yase=Hero("亚瑟",100000000000,6)
yase.fkl()
print(yase.hp)
\ 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