Commit 137b2e50 by BellCodeEditor

save project

parent e9036250
Showing with 13 additions and 8 deletions
class Hero: class Hero:
def___init__(self,name,hp,attack): def __init__(self,name,hp,attack):
level=1 self.level=1
self.name = "凯" self.name=name
self.hp = 300 self.hp=hp
self.attack = 999 self.attack=attack
kai=Hero("凯",300,999)
print("凯的血量为:"kai.hp)
yase=Hero('亚瑟',300,20)
houyi=Hero('后羿',250,23)
print("亚瑟的血量是:",yase,hp)
print("后羿的血量是:",houyi,hp)
def upgrade():
Self.level=
\ No newline at end of file
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