Commit f1334d78 by BellCodeEditor

save project

parent 22354288
Showing with 18 additions and 0 deletions
class hero:
def __init__(a1,n,h,a):
a1.l=1
a1.n=n
a1.h=h
a1.a=a
def j(objec):
objec.l=objec.l+1
objec.h=objec.h+50
objec.a=objec.a+4
yase=hero("亚瑟",300,20)
houyi=hero("后羿",250,230)
yase.j()
print("亚瑟的血量",yase.h)
print('后羿的血量',houyi.h)
\ 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