Commit d56a9dfc by BellCodeEditor

save project

parent caa2835c
Showing with 12 additions and 6 deletions
class Hero:
def __init__ (self,):
self.HP=
self.attack=90000
steve=Hero()
print(steve.HP)
\ No newline at end of file
def __init__ (self,name,HP,attack):
self.level=1
self.name=name
self.HP=HP
self.attack=attack
steve=Hero("Steve",10000000,90000)
def hi():
steve.level=steve.level+1
steve.HP=steve.HP+1000000
steve.attack=steve.attack+9000
hi()
\ 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