Commit 40a60192 by BellCodeEditor

save project

parent 4ad9d779
Showing with 9 additions and 7 deletions
......@@ -4,11 +4,13 @@ class Hoer:
self.name=name
self.hp=hp
self.attack=attack
def upgrad(self):
self.level=self.level+1
self.hp=self.hp+620
self.attack=self.attack+30
xialuote=Hoer("夏洛特",3425,114)
bailishouyue=Hoer("百里守约",3120,742)
def upgrad():
xialuote.level=xialuote.level+1
xialuote.hp=xialuote.hp+620
xialuote.attack=xialuote.attack+30
upgrad()
print(xialuote.hp)
\ No newline at end of file
bailishouyue.upgrad()
print(bailishouyue.level)
print(bailishouyue.hp)
print(bailishouyue.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