Commit 14aa37d3 by BellCodeEditor

auto save

parent d6c81a0f
Showing with 17 additions and 0 deletions
class hero:
def __init__(self,name,level,hp,attack):
self.hp=hp
self.level=level
self.attack=attack
tian=hero("tian",1,500,50)
def aaa():
tian.hp=tian.hp+50
tian.level=tian.level+1
tian.attack=tian.attack+5
aaa()
print(tian.level)
\ 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