Commit 84e7ea1c by BellCodeEditor

auto save

parent 13a55b67
Showing with 7 additions and 5 deletions
class Hero: class Hero:
def __init__(self): def __init__(self,name,hp,attck):
self.level=1 self.level = 1
self.hp=300 self.name = name
self.attck=200 self.hp = hp
yase = Hero() self.attck = attck
yase = Hero('亚瑟',200,20)
print(yase.hp) print(yase.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