Commit 6e74ede2 by BellCodeEditor

save project

parent 2fb9be7b
Showing with 7 additions and 14 deletions
class Hero:
def __init__(yase,name,hp,attacr):
yase.level=1
yase.name=name
yase.hp=hp
yase.attack=attacr
yase=Hero()
print("血量是"+str(yase.hp))
class Hero:
def __init__(yase,name,hp,attacr):
yase.level=1
yase.name=name
yase.hp=hp
yase.attack=attacr
yase=Hero()
def __init__(self,name,hp,attacr):
self.level=1
self.name=name
self.hp=hp
self.attack=attacr
yase=Hero("垭瑟",300,20)
houyi=Hero("后羿",250,23)
print("血量是"+str(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