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:
def __init__(self,dj,hp,xl):
self.dj=dj
def __init__(self,name,hp,xl):
self.name=name
self.hp=hp
self.xl=xl
yase=hero("yase",300,20)
hoyi=hero("hoyi",100,20)
def sj():
yase.dj=yase.dj+1
yase.hp=yase.hp+38
yase.xl= self.xl+1
print(yase)
\ No newline at end of file
def sj(self):
# self.dj+=1
self.hp+=38
self.xl+=1
yase=hero("yase",60,20)
yase.sj()
print(yase.xl)
\ 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