Commit cad3db7e by BellCodeEditor

save project

parent a850d88f
Showing with 9 additions and 9 deletions
......@@ -5,16 +5,16 @@ class Hero:
self.hp=hp
self.attack=attack
def s():
yase.level=yase.level+1
yase.hp=yase.hp+50
yase.attack=yase.attack+4
def s(self):
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attack+4
yase = Hero('yase',300,20)
print('血量',yase.hp)
s()
s()
print('2血量',yase.hp)
houyi = Hero('houyi',300,20)
houyi.s()
print('1',houyi.level)
print('2',houyi.hp)
print('3',houyi.attack)
#hy=Hero('hy',250,23)
#k=Hero('K',5600,199)
#print(yase.attack)
......
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