Commit 403816b1 by BellCodeEditor

save project

parent 7a6cd483
Showing with 8 additions and 7 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,hp,gongji):
self.hp=250 self.level=1
self.denji=18 self.name=name
self.gongjili=100 self.hp=hp
yase=Hero() self.gongji=gongji
print(yase.gongjili) yase=Hero("亚瑟",100,200,1000)
kai=Hero("铠",1000,500,5000)
houyi=Hero("后羿",100,200,2000)
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