Commit a7ad6d81 by BellCodeEditor

save project

parent f0811514
Showing with 11 additions and 3 deletions
...@@ -6,5 +6,13 @@ class Hese: ...@@ -6,5 +6,13 @@ class Hese:
s.attack=attack s.attack=attack
yase=Hese('亚瑟',300,20) yase=Hese('亚瑟',300,20)
houyi=Hese('后羿',240,23) houyi=Hese('后羿',240,23)
print('亚瑟HP:',yase.HP)
print('后羿HP:',houyi.HP) def SJ():
\ No newline at end of file yase.level=yase.level+1
yase.HP=yase.HP+100
yase.attack=yase.attack+10
yase=Hese('亚瑟',300.20)
SJ()
SJ()
print('升级两次后亚瑟血量:'yase.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