Commit 3d87d34b by BellCodeEditor

auto save

parent f47689a4
Showing with 17 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack):
self.name=name
self.level=1
self.hp=hp
self.attack=attack
def upgrade(self):
self.level+=1
self.hp+=9999
self.attack+=9999
Daker=Hero('SuperHero',99999,99999)
Daker.upgrade()
Daker.upgrade()
print(Daker.level)
print(Daker.hp)
print(Daker.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