Commit 4a552050 by BellCodeEditor

save project

parent d6c81a0f
Showing with 18 additions and 0 deletions
class hero:
def __init__(seif,name,血量,攻击力):
seif.name=name
seif.血量=血量
seif.攻击力=攻击力
seif.等级=1
def a(seif):
seif.等级+=1
seif.血量+=100
seif.攻击力+=50
qp=hero('wukong',250,100)
wo=hero('change',200,85)
qp.a()
wo.a()
print('血量为:',qp.血量)
print('血量为:',wo.血量)
\ 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