Commit c35bbf07 by BellCodeEditor

save project

parent d6c81a0f
Showing with 17 additions and 0 deletions
class hero:
def __init__(self,name,hp,attack,lan):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
Dreus=hero("诺手",652.24,64,263)
jianmo=hero("剑魔",580,60,0)
print("诺手生命值一级为:",Dreus.hp)
print("剑魔攻击力一级为:",jianmo.attack)
def abc():
jianmo.level+=1
jianmo.hp+=80
jianmo.attack+=5
abc()
print(jianmo.hp)
\ 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