Commit c7d070e4 by BellCodeEditor

save project

parent d6c81a0f
Showing with 16 additions and 0 deletions
class Hero:
def __init__(self,name,level,hp,atk,defn):
self.name=name
self.level=level
self.hp=hp
self.atk=atk
self.defn=defn
houyi = Hero("后羿",1,500,100,40)
print("属性表:")
print("level:",houyi.level)
def upL():
houyi.level+=1
houyi.hp+=250
houyi.atk+=100
houyi.defn+=50
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