Commit cd5dab6a by BellCodeEditor

auto save

parent 620935db
Showing with 13 additions and 10 deletions
class Hero: class hero:
def __init__(s): def __init__(self,name,hp,attack):
s.level=1 self.hp=hp
s.hp=300 self.level=1
s.attack=20 self.attack=attack
yase=Hero() self.name=name
luban=Hero()
yase=hero("亚瑟",300,20)
houyi=hero("后羿",250,40)
print(yase.name)
print(yase.hp) print(yase.hp)
print(yase.attack) print(yase.attack)
print(luban.attack) print(houyi.name)
print(houyi.hp)
print(houyi.attack)
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