Commit 88407ecd by BellCodeEditor

save project

parent 82a903b9
Showing with 10 additions and 8 deletions
class heor: class heor:
def __init__(self): def __init__(self,level,name,hp,attack):
self.level = 1 self.level = level
self.hp = 300 self.name = name
self.attack = 20 self.hp = hp
yase = heor() self.attack = attack
print("yase的等级是:",yase.level) jianyang = heor(1,"煤焦羊",300,20)
print("yase的血量是:",yase.hp) renshen =heor(1,"人参公鸡"24030)
print("yase的攻击是:",yase.attack) print("煤焦羊:",jianyang.hp)
print("人参公鸡:",renshen.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