Commit eecd8010 by BellCodeEditor

save project

parent 27de1b04
Showing with 11 additions and 2 deletions
class class Hero():
\ No newline at end of file def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
zhuangzhou=Hero('庄周',1000,10)
ganjiangmoye=Hero('干将莫邪',200,34)
print(zhuangzhou.hp)
print(ganjiangmoye.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