Commit a380e358 by BellCodeEditor

save project

parent d493d152
Showing with 9 additions and 12 deletions
class Hero:
def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
yase=Hero('yase',300,20)
hy=Hero('hy',250,23)
k=Hero('K',5600,199)
print(yase.attack)
print(hy.attack)
print(k.attack)
\ No newline at end of file
def __init__(self,mingzi,xueliang,gongjili):
self.mingzi=mingzi
self.xueliang=xueliang
self.gongjili=gongjili
liyiran=Hero("m",100000,100000)
zhangweijia=Hero("q",53136254362756723965982136479329545865865979586943569356937260583489563497548956983465893757863489563457934856893469689488888888888888888888888888888883965809462305634096534067580934578475680979804765034709679403769472609376369456456784856439564789365923876523786542378659723569638912562138974325555555555555555555555555555585472158614785381264783521836478523785437843785437843756784365785313625436275672396598213647932954586586597958694356935693726058348956349754895698346589375786348956345793485689346968948888888888888888888888888888888396580946230563409653406758093457847568097980476503470967940376947260937636945645678485643956478936592387652378654237865972356963891256213897432555555555555555555555555555558547215861478538126478352183647852378543784378543784375678436578,23243243254325)
print(liyiran.xueliang)
print(zhangweijia.xueliang)
\ 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