Commit 813dfb61 by BellCodeEditor

auto save

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