Commit 5c00e6f7 by BellCodeEditor

save project

parent 08f8dbde
Showing with 12 additions and 0 deletions
class Hero():
level=1
def __init__(self,name,hp,attack):
self.level=2
self.name=name
self.hp=hp
self.attack=attack
yase_sb = Hero("垭瑟",300,20)
houyi_sb=Hero("后羿",240,23)
print("hp1:"+str(yase_sb.hp))
print("hp2:"+str(houyi_sb.hp))
\ 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