Commit d6ae896f by BellCodeEditor

save project

parent b09121db
Showing with 11 additions and 6 deletions
class Hero:
def __init__(self):
self.dengji=1
self.xueliang=100
self.gongji=20
self.fangyu=50
liuyunyang=Hero()
def __init__(self,name,xueliang,gongji,fangyu,dengji):
self.dengji=dengji
self.xueliang=xueliang
self.gongji=gongji
self.fangyu=fangyu
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)
\ 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