Commit c1db271b by BellCodeEditor

save project

parent 65c22f84
Showing with 3 additions and 3 deletions
class Hero: class Hero:
def__init__(self,name,hp,attack): def __init__(self,name,hp,attack):
self.level=1 self.level=1
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
yese=Hero("垭瑟"30020) yese=Hero("垭瑟",300,20)
print(yase.hp) print(yase.hp)
houyi=Hero("后羿"24023) houyi=Hero("后羿",240,23)
print(houyi.hp) print(houyi.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