Commit 17be2dd7 by BellCodeEditor

save project

parent a883ba49
Showing with 9 additions and 6 deletions
......@@ -4,9 +4,12 @@ class Hero:
self.hp=hp
self.gongjili=gjl
self.fangyuli=fyl
def shengji(self):
self.hp=self.hp+4.166666666666667
self.gongjili=self.gongjili+10
self.fangyuli=self.fangyuli+0.5
duixiang1=Hero("xueshanjingying",120,0,0)
def shengji():
duixiang1.hp=duixiang1.hp+4.166666666666667
duixiang1.gongjili=duixiang1.gongjili+10
duixiang1.fangyuli=duixiang1.fangyuli+0.5
shengji()
\ No newline at end of file
duixiang1.shengji()
print(duixiang1.hp)
print(duixiang1.gongjili)
print(duixiang1.fangyuli)
\ 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