Commit d56a9dfc by BellCodeEditor

save project

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