Commit 75590d66 by BellCodeEditor

auto save

parent d6e48422
Showing with 6 additions and 14 deletions
...@@ -4,7 +4,7 @@ class Hero: ...@@ -4,7 +4,7 @@ class Hero:
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
def aaa(): def a(self)):
yase.level=yase.level+1 yase.level=yase.level+1
yase.hp=yase.hp+100 yase.hp=yase.hp+100
yase.attack=yase.attack+4 yase.attack=yase.attack+4
...@@ -12,17 +12,8 @@ def aaa(): ...@@ -12,17 +12,8 @@ def aaa():
yase = Hero("垭瑟",300,20) yase = Hero("垭瑟",300,20)
houyi = Hero("后羿",200,40) houyi = Hero("后羿",200,40)
aaa() a()
aaa()
aaa()
aaa()
aaa()
aaa()
aaa()
aaa()
aaa()
print(yase.level)
print(yase.hp)
print(yase.attack)
print('亚瑟的等级为:' + yase.level)
print('亚瑟的血量为:' + yase.hp)
print('亚瑟的攻击为:' + yase.attack)
\ 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