Commit 85c0573f by BellCodeEditor

save project

parent bf54722a
Showing with 9 additions and 6 deletions
class hero:
def _init_(self):
def _init_(self,name,hp,attack):
srlf.level = 1
self.hp= 300
self.attack= 20
srlf.name=name
srlf.hp=hp
self.attack=attack
yase = hero()
yase = hero("亚瑟"300,20)
houyi = hero("后羿"240,23)
K=hero("K",5600,199)
print("yase的血值为:",yase.hp)
print("yase的攻击力为:",yase.attack)
print("yase的攻击力为:",yasei.hp)
print(K)
......
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