Commit e57feb41 by BellCodeEditor

auto save

parent 96347134
Showing with 18 additions and 11 deletions
class sb:
def __init__(self):
self.level=1
self.hp=300
self.attack=20
ds=sb()
print(ds.hp)
\ No newline at end of file
class hero: class hero:
def __init__(self,dj,hp,xl): def __init__(self,name,hp,xl):
self.dj=dj self.name=name
self.hp=hp self.hp=hp
self.xl=xl self.xl=xl
yase=hero("yase",300,20) def sj(self):
hoyi=hero("hoyi",100,20) # self.dj+=1
def sj(): self.hp+=38
yase.dj=yase.dj+1 self.xl+=1
yase.hp=yase.hp+38 yase=hero("yase",60,20)
yase.xl= self.xl+1 yase.sj()
print(yase.xl)
print(yase) \ No newline at end of file
\ 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