Commit 8fca50be by BellCodeEditor

save project

parent d6c81a0f
Showing with 16 additions and 0 deletions
class hero:
def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
猴一=hero('猴一',240,10000)
def upgrade():
猴一.hp=猴一.hp+4
猴一.level=猴一.level+1
猴一.attack=猴一.attack+50
print(猴一.hp)
print(猴一.level)
print(猴一.attack)
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