Commit 32b3eb4c by BellCodeEditor

save project

parent 2f176a3f
Showing with 8 additions and 4 deletions
class Hero:
def __init__(self):
self.HP=5000
def __init__(self,name,HP,attack):
self.level=1
self.attack=100
kai=Hero()
self.name=name
self.HP=HP
self.attack=attack
kai=Hero('凯',5000,100)
jialuo=Hero('伽罗',4000,200)
print(kai.HP)
print(jialuo.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