Commit f85c13a5 by BellCodeEditor

save project

parent 8e8cd32a
Showing with 5 additions and 4 deletions
......@@ -4,11 +4,12 @@ class Heor:
self.name=name
self.hp=hp
self.attack=attack
def deji():
self.level=self.level+1
self.hp=self.hp*1.25
self.attack=self.attack*1.05
yase=Heor('亚瑟',300,20)
houyi=Heor('后羿',240,23)
print('亚瑟血量为'+str(yase.hp))
\ No newline at end of file
yase.deji()
print('等级为'+str(yase.level))
print('血量为'+str(yase.hp))
print('攻击力为'+str(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