Commit d4762113 by BellCodeEditor

save project

parent 45162c96
Showing with 9 additions and 6 deletions
class Hero: class hero:
def __init__(slef,name,hp,attack): def __init__(slef,hp,attack):
slef.level = 1 slef.level = 1
slef.name = yase slef.hp = hp
slef.hp = 300 slef.attack = attack
slef.attack = 20
yase = hero(1000,20)
print(yase.hp)
houyi = hero(500,25)
print(houyi.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