Commit bc1f070c by BellCodeEditor

save project

parent 7ef6cbd4
Showing with 8 additions and 5 deletions
class Hero(): class Hero():
def __init__(self): def __init__(self,name,hp,attack):
self.hp = 333 self.name = name
self.level = 1234567 self.hp = hp
self.attack = 123456 self.level =1
yase = Hero() self.attack = attack
yase = Hero("亚瑟",300,200)
houyi = Hero("后羿",240,240)
print(yase.hp) print(yase.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