Commit ef48b340 by BellCodeEditor

auto save

parent f47689a4
Showing with 18 additions and 0 deletions
class yx:
def __init__(self,name,Hp,attack):
self.name=name
self.level=1
self.Hp=Hp
self.attack=attack
def shengji(self):
self.level=self.level+1
self.Hp=self.Hp+100
self.attack=self.attack+20
djatm=yx("迪迦奥特曼",230,50)
djatm.shengji()
gyatm=yx("盖亚奥特曼",400,25)
gyatm.shengji()
print(gyatm.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