Commit faa11273 by BellCodeEditor

save project

parent f76affdb
Showing with 7 additions and 7 deletions
class Hero: class Hero:
def __init__(seif): def __init__(seif,name,hp,attack):
seif.level=1 seif.level=1
seif.hp=300 seif.hp=hp
seif.attack=20 seif.attack=attack
yase=Hero() yase=Hero("猴亿",1,1)
print(yase.level) yaes=Hero("亚瑟爸爸",999,999)
print(yase.hp) print(yase.hp)
print(yase.attack) print(yaes.hp)
\ No newline at end of file \ 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