Commit 92f4d88e by BellCodeEditor

save project

parent c55b95b6
Showing with 10 additions and 6 deletions
class Hero():
del __call__ (yase)
yase.hp=300
yase.attack=20
yase.level=1
sat=yase()
print(sat.hp)
def __init__(self,name,hp,attack,level):
self.name = name
self.hp = hp
self.attack = attack
self.level = level
yase=Hero("亚瑟",300,20,14)
houyi=Hero("后羿",260,24,14)
print("亚瑟血量为:",yase.hp)
print("后羿血量为:",houyi.hp)
\ 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