Commit 2d8e2b24 by BellCodeEditor

save project

parent 22354288
Showing with 19 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attar):
self.leve=1
self.name=name
self.hp=hp
self.attar=attar
yase=Hero("亚瑟",300,100)
houyi=Hero("后羿",200,150)
print(yase.name)
def qwe(self):
self.leve=self.leve+1
self.hp=self.hp+50
self.attar=self.attar+4
yase=("亚瑟,300,20)
yase.updent()
print("等级是"+yase.leve)
print("血量是"+yase.hp)
print("攻击是"+yase.attar)
\ 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