Commit e7a6730c by BellCodeEditor

save project

parent 01491c87
Showing with 7 additions and 4 deletions
class Hero:
def __init__(a):
def __init__(a,name,hp,attack):
a.level=1
a.hp=300
a.attack=20
yasa=Hero()
a.name=name
a.hp=hp
a.attack=attack
yasa=Hero("垭瑟",300,20)
houyi=Hero("后羿",250,23)
print(yasa.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