Commit 0b76c992 by BellCodeEditor

save project

parent 813dfb61
Showing with 9 additions and 5 deletions
class yingxiong:
def __init__(self,name,hp,kun):
def __init__(self,name,exp,hp,kun):
self.exp=1
self.name=name
self.hp=hp
self.kun=kun
yase=yingxiong('亚瑟',200,30)
houyi=yingxiong('后羿',160,35)
yase=yingxiong('亚瑟',1,200,30)
houyi=yingxiong('后羿',1,160,35)
def s1():
yase.exp=yase.exp+1
yase.hp=yase.hp+30
yase.kun=yase.kun+5
s1()
print('亚瑟血量=',yase.hp)
print('后羿血量=',houyi.hp)
print('亚瑟攻击=',yase.kun)
print('后羿攻击=',houyi.kun)
\ No newline at end of file
print('后羿攻击=',houyi.kun)
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