Commit ac82a94e by BellCodeEditor

save project

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