Commit bb3c69f4 by BellCodeEditor

save project

parent d28b6cf2
Showing with 8 additions and 4 deletions
class Hero:
def __init__(self):
def __init__(self,hp,attack):
self.level = 1
self.hp = 300
self.attack = 20
yase = Hero()
self.hp = hp
self.attack = attack
yase = Hero(300,20)
houyi = Hero(270,23)
print("垭瑟的血量为:",yase.hp)
print("垭瑟的攻击力为:",yase.attack)
print("后羿的血量为:",houyi.hp)
print("后羿的攻击力为:",houyi.attack)
\ 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