Commit 4aed28b3 by BellCodeEditor

save project

parent ae3d3f8c
Showing with 6 additions and 3 deletions
class Hero:
def __init__ (self):
def __init__ (self,hp,attack,name):
self.level=1
self.hp=300
self.attack=20
yase = Hero()
print(yase.hp)
self.name=name
yase = Hero("亚瑟",300,20)
houyi=Hero("后羿",240,23)
print("亚瑟的血量:",houyi.hp)
print("后羿的血量:",yase.hp)
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