Commit d6ae896f by BellCodeEditor

save project

parent b09121db
Showing with 11 additions and 6 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,name,xueliang,gongji,fangyu,dengji):
self.dengji=1 self.dengji=dengji
self.xueliang=100 self.xueliang=xueliang
self.gongji=20 self.gongji=gongji
self.fangyu=50 self.fangyu=fangyu
liuyunyang=Hero() self.name=name
liuyunyang=Hero("刘韵阳",1000,1000,1000,1000)
liyiran=Hero("李沂燃",20,20,20,1)
zhangweijia=Hero("张洧嘉",20,20,20,1)
qiaozhi=Hero("乔治",20,20,20,1)
print(liuyunyang.xueliang) print(liuyunyang.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