Commit cd5dab6a by BellCodeEditor

auto save

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