Commit 08c49252 by BellCodeEditor

save project

parent d6c81a0f
Showing with 14 additions and 0 deletions
class Hero:
def __init__(self):
self.level = 1
self.hp = 300
self.attack = 20
yaes = Hero()
print("yaes的血量值为:",yaes.hp)
print("yaes的攻击值为:",yaes.attack)
print("yaes的等级为:",yaes.level)
def a():
yaes.level=yaes.level+1
yaes.hp=yaes.hp+50
yaes.attack=yaes.attack+5
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