Commit 640a192b by BellCodeEditor

save project

parent ba86f195
Showing with 13 additions and 4 deletions
...@@ -4,6 +4,10 @@ class Hero: ...@@ -4,6 +4,10 @@ class Hero:
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
def Score(self):
self.attack=self.attack+100000000000
yase=Hero('yase',300,20) yase=Hero('yase',300,20)
hy=Hero('hy',250,23) hy=Hero('hy',250,23)
k=Hero('K',5600,199) k=Hero('K',5600,199)
...@@ -12,6 +16,11 @@ print(hy.attack) ...@@ -12,6 +16,11 @@ print(hy.attack)
print(k.attack) print(k.attack)
def Score():
yase.attack=yase.attack+10000
Score()
\ No newline at end of file
hy=Hero('hy',250,23)
hy.Score()
print(hy.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