Commit 2bf99429 by BellCodeEditor

save project

parent a20b41e3
Showing with 4 additions and 4 deletions
class Hero: class Hero:
def __init___(self,level,hp,atk,defn): def __init__(self,name,level,hp,atk):
self.name=name
self.level=level self.level=level
self.hp=hp self.hp=hp
self.atk=atk self.atk=atk
self.defn=defn houyi = Hero("后羿",15,7500,3000)
houyi=Hero("后羿",15,7500,3000,1500)
print("属性表")
print("level:",houyi.level) print("level:",houyi.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