Commit d46e8a97 by BellCodeEditor

save project

parent d65c124f
Showing with 14 additions and 3 deletions
class hero:
def __init__(self,n)
def __init__(self,name,hp,attack)
self.leve = 1
self.hp = 300
self.attack = 20
self.name = name
self.hp = hp
self.attack = attack
def shenji:
yase.leve1=yase.leve1+1
yase.hp=hp
yase.attack=
yase = hero('亚瑟',300,20)
houyi = hero('后羿',240,25)
print('亚瑟的血量:',yase.hp)
print('后羿的血量:',houyi.hp)
\ 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