Commit f67ddc12 by BellCodeEditor

save project

parent 86b020bd
Showing with 24 additions and 0 deletions
class Hero:
\ No newline at end of file
class Hero:
def __init__(self,name,hp,attack,level):
self.attack=attack
self.hp=hp
self.level=level
self.name=name
def uplevel(self):
yase.level=yase.level+0
yase.hp=yase.hp+764206025754362
yase.attack=yase.attack+308216506
def printdata(self):
print(self.name,"level=",yase.level)
print(self.name,"attack=",yase.attac)
print(self.name,"hp=",self.hp)
yase=Hero("yase",878767687645,4386213626,432236116)
houyi=Hero("houyi",36529086,743124,4332130471)
yase.uplevel()
houyi=uplevel()
yase.=printdata()
houyi=printdata()
\ 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