Commit 472c5a2c by BellCodeEditor

save project

parent 9bebf302
Showing with 5 additions and 5 deletions
...@@ -3,10 +3,10 @@ class hero(): ...@@ -3,10 +3,10 @@ class hero():
self.level=a self.level=a
self.hp=b self.hp=b
self.attack=c self.attack=c
def upgrade(): def upgrade(self):
yase.level+=1 self.level+=1
yase.hp+=40 self.hp+=40
yase.attack+=30 self.attack+=30
yase=hero(1,500,40) yase=hero(1,500,40)
upgrade() yase.upgrade()
print(yase.hp) print(yase.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