Commit edcfa41c by BellCodeEditor

save project

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