Commit 0a8a778d by BellCodeEditor

save project

parent d6c81a0f
Showing with 13 additions and 0 deletions
class hero():
def __init__(self,name,hp,gongji):
self.dengji=1
self.name=name
self.hp=hp
self.gongji=gongji
luban=hero("鲁班",220,60)
def aua():
luban.dengji=luban.dengji+1
luban.hp=luban.hp+30
luban.gongji=luban.gongji+10
aua()
print(luban.hp)
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