Commit 06ff76c4 by BellCodeEditor

save project

parent d6c81a0f
Showing with 15 additions and 0 deletions
class Hero:
def __init__(self,Name,hp,attack):
self.level =1
self.name =name
self.hp=hp
self.attack=attack
jieruia=Hero('杰瑞'300,20)
def upgrade():
jieruia.level=jieruia.level+1
jieruia.hp=jieruia.hp+50
jieruia.attack=jieruia.attack+4
jieruia =Hero("jieruia",300,20)
print("杰瑞初:"jieruiahp)
upgrade()
upgrade()
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