Commit 88407ecd by BellCodeEditor

save project

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