Commit 3b317e7f by BellCodeEditor

auto save

parent 4fd2b52b
Showing with 8 additions and 10 deletions
class Cat:
def __init__(self,name,hp,attack):
self.level = 1
self.name = name
self.hp = hp
self.attack = attack
Yang = Cat("羊",900,30)
print(Yang.hp)
class hero:
def __init__(self,name):
self.level=1
self.hp=250
self.attack=40
self.name=name
yase=hero("亚瑟")
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