Commit faa11273 by BellCodeEditor

save project

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