Commit 8d166060 by BellCodeEditor

save project

parent d78df5bc
Showing with 3 additions and 2 deletions
class Hero: class Hero:
def __init__(self,name,hp,attack) def __init__(self,name,hp,attack):
self.level=name self.level=1
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
self.name=name
kunkun=Hero('坤坤'300,80) kunkun=Hero('坤坤'300,80)
kunba=Hero('坤八'250,99) kunba=Hero('坤八'250,99)
print(kunkun.level) print(kunkun.level)
......
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