Commit 12f7886c by BellCodeEditor

save project

parent ba694e5d
Showing with 2 additions and 2 deletions
...@@ -2,8 +2,8 @@ class hero: ...@@ -2,8 +2,8 @@ class hero:
def __init__(self,name,hp,attack): def __init__(self,name,hp,attack):
self.level=1 self.level=1
self.name=name self.name=name
slef.hp=hp self.hp=hp
self.attack self.attack=attack
zhouyu=hero('周瑜',240,30) zhouyu=hero('周瑜',240,30)
zhangfei=hero('张飞',300,40) zhangfei=hero('张飞',300,40)
print(zhouyu.name) print(zhouyu.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