Commit d7937af6 by BellCodeEditor

save project

parent defccbd5
Showing with 3 additions and 3 deletions
class Hero:#定义类
def __init__(self):#定义构造方法
def __init__(self,hp,gjl):#定义构造方法
self.level=1
self.hp=650
self.gjl=190
self.hp=hp
self.gjl=gjl
houyi=Hero()
print(houyi.hp,houyi.gjl)
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