Commit 411d8f30 by BellCodeEditor

save project

parent 22354288
Showing with 13 additions and 0 deletions
class Heros:
def __init__(self,name,attack,hp):
self.hp=hp
self.levle=1
self.attack=attack
self.name=name
def updata(self):
self.hp +=65
wukong=Heros('悟空' ,36,7777777999999)
wukong.updata()
print( wukong.name+"的hp:"+str(wukong.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