Commit e0a2a4f3 by BellCodeEditor

save project

parent d6c81a0f
Showing with 15 additions and 0 deletions
class hero:
def __init__(a,name,hp,att):
a.level=1
a.name=name
a.hp=hp
a.att=att
zhaoyun=hero("赵云",300,50)
houyi=hero("后羿",200,80)
def b():
zhaoyun.hp=zhaoyun.hp+10
zhaoyun.att=zhaoyun.att+20
b()
print(zhaoyun.hp)
print(zhaoyun.att)
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