Commit 98c5211d by BellCodeEditor

save project

parent 3a1bdf14
Showing with 6 additions and 5 deletions
......@@ -4,10 +4,10 @@ class Hero:
self.name=name
self.hp=hp
self.attack=attack
def upgrade(self):
self.level+=1
self.hp+=10000
self.attack+=10000000
yase=Hero("yase",10000,100000)
def upgrade():
yase.level+=1
yase.hp+=10000
yase.attack+=10000000
upgrade()
yase.upgrade()
print(yase.hp)
\ 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