Commit cf9c0c64 by BellCodeEditor

save project

parent e328557e
Showing with 9 additions and 6 deletions
class Hero: class Hero:
def __init__(a): def __init__(a,hp,attack,name):
a.hp=1 a.hp=hp
a.level=0 a.level=1
a.attack=1 a.attack=attack
yade=Hero() a.name=name
print(yade.hp) yase=Hero(1,1,"王栋巍")
houyin=Hero(1,1,"王栋巍后羿")
print(houyin.name)
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