Commit b8966e14 by BellCodeEditor

save project

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