Commit 00df7887 by BellCodeEditor

save project

parent 314faa7b
Showing with 15 additions and 0 deletions
class heor:
def __init__(self,level,name,hp,attack):
self.level = level
self.name = name
self.hp = hp
self.attack = attack
def uprade(self):
self.level=self.level+1
self.hp=self.hp+1
self.attack=self.attack+1
jianyang = heor(1,"煤焦羊",300,20)
jianyang.uprade()
print("煤焦羊:",jianyang.level)
print("煤焦羊:",jianyang.hp)
print("煤焦羊:",jianyang.attack)
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