Commit 7f5212c5 by BellCodeEditor

save project

parent e613f877
Showing with 9 additions and 19 deletions
class Hero: class Hero:
def __init__(self,name,hp,attack): def __init__(ziji,name,hp,attack):
self.level=1 ziji.level=1
self.name=name ziji.name=name
self.hp=hp ziji.hp=hp
self.attack=attack ziji.attack=attack
yase=Hero('yase',300,20) ys=Hero('ys',300,20)
hy=Hero('hy',250,23) hy=Hero('hy',250,23)
k=Hero('K',5600,199) sq=Hero('sq',1000000000,23000000000)
print(yase.attack) print(sq.hp)
print(hy.attack) \ No newline at end of file
print(k.attack)
class guaiwu:
def __init__(me,mz,fy):
me.dj=1000
me.mz=mz
me.fy=fy
sb=guaiwu('sb',10000)
print(sb.mz)
\ 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