Commit 9ee6c6df by BellCodeEditor

save project

parent cafff45a
Showing with 6 additions and 7 deletions
class hero:
def __init__(self):
def __init__(self,name,hp,attack):
self.level = 10
self.hp = 99999
self.attack = 999
yase = hero()
print("卢本伟的血量为:",yase.hp)
print("卢本伟的攻击力为:",yase.attack)
lubenwei = hero("卢本伟",99999,999)
sunxaiochuan = hero("孙笑川",99999,999)
print("卢本伟的血量为:",lubenwei.hp)
print("孙笑川的血量为:",sunxaiochuan.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