Commit cb584d50 by BellCodeEditor

save project

parent 851fa07a
Showing with 14 additions and 8 deletions
class Hero:
def __init__(self):
self.lever = 1
self.HP = 1
self.attack = 99
yase = Hero()
print('等级:%d'%yase.lever)
def __init__(self,name,HP,attack):
self.leve = 1
self.name = name
self.HP = HP
self.attack =attack
yase = Hero('亚瑟',300,20)
houyei = Hero('后羿',250,25)
print('等级:%s'%yase.name)
print('血量:%d'%yase.HP)
print('伤害:%d'%yase.attack)
\ No newline at end of file
print('伤害:%d'%yase.attack)
print('等级:%s'%houyei.name)
print('血量:%d'%houyei.HP)
print('伤害:%d'%houyei.attack)
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