Commit 1edee73f by BellCodeEditor

save project

parent 9b36961b
Showing with 5 additions and 3 deletions
......@@ -6,5 +6,8 @@ class Hero:
self.mp = mp
self.attack = attack
print("恭喜你创建成功!")
a = Hero("奥特曼",2,900,600,30)
print(a.name,"等级",a.level,"生命值"a.hp,"蓝量",a.mp,"攻击力",a.attack)
\ No newline at end of file
a = Hero("奥特曼",1,900,600,30)
print(a.name,"等级 ",a.level,"生命值 "a.hp,"蓝量 ",a.mp,"攻击力 ",a.attack)
a.level = a.level + 1
print(a.level)
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