Commit 2239d6ac by BellCodeEditor

auto save

parent f47689a4
Showing with 22 additions and 0 deletions
class Hero:
def __init__(null,name,hp,ak):
null.lv=1
null.name=name
null.hp=hp
null.ak=ak
yase=Hero("亚瑟",300,20)
hy=Hero("后羿",350,21)
print(yase.name,yase.hp,yase.ak)
print(hy.name,hy.hp,hy.ak)
def ud():
yase.hp=yase.hp+50
yase.ak=yase.ak+20
yase.lv=yase.lv+1
ud()
ud()
print(yase.name,yase.hp,yase.ak)
print(hy.name,hy.hp,hy.ak)
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