Commit 6e74ede2 by BellCodeEditor

save project

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