Commit ad5fe8a6 by BellCodeEditor

auto save

parent 0846bc45
Showing with 4 additions and 5 deletions
...@@ -5,7 +5,7 @@ class Hero: ...@@ -5,7 +5,7 @@ class Hero:
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
yase=Hero(name='亚瑟',hp=300,attack=20) yase=Hero('亚瑟',300,20)
houyi=Hero(name='后羿',hp=240,attack=23) # houyi=Hero('后羿',240,23)
print('亚瑟的血量为',yase.hp) # print('亚瑟的血量为',yase.hp)
print('后羿的血量为',houyi.hp) # print('后羿的血量为',houyi.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