Commit edcfa41c by BellCodeEditor

save project

parent 95a03152
Showing with 11 additions and 16 deletions
......@@ -4,18 +4,14 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
yase=Hero('yase',2,1)
def pppp():
yase.level=yase.level+0.5
yase.hp=yase.hp+0.01
yase.attack=yase.attack+0.00000000000000000000001
pppp()
pppp()
pppp()
pppp()
pppp()
pppp()
pppp()
print(yase.level)
print(yase.hp)
print(yase.attack)
\ No newline at end of file
def pppp(self):
self.level=self.level+1
self.hp=self.hp-10
self.attack=self.attack-20
houyi=Hero('houyi',3,2)
houyi.pppp()
print(houyi.level)
print(houyi.hp)
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