Commit 6a33f6e9 by BellCodeEditor

save project

parent 26d1ec71
Showing with 14 additions and 15 deletions
......@@ -4,18 +4,18 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
yase=Hero('yase',300000000000000000,200000)
def shengji(self):
self.level =yase.level+1
self.hp = yase.hp+ 1000
self.attack = yase.attack+20
def shuchu(self)
print(self.level, self.hp,self.attsck)
yase = Hero('yase',300,20)
yase.shengji()
yase.shengji()
def shengji():
yase.level =yase.level+1
yase.hp = yase.hp+ 1000
yase.attack = yase.attack+20
print(yase.attack)
shengji()
shengji()
print(yase.attack)
hy=Hero('hy',860000000000,900000000000000000000000000000000000000000000000000000000000)
k=Hero('K',56000000000,1990000)
print(yase.attack)
print(hy.attack)
print(k.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