Commit 99f5a65e by BellCodeEditor

auto save

parent aa7916dd
Showing with 15 additions and 2 deletions
class Hore: class Hore:
def __init__(self,name,hp,attack): def __init__(self,name,hp,attack):
self.lever=100 self.lever=1
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
longwang=Hore("longwang",5000000,100000000) def uppng(self):
self.lever=self.lever+1
self.hp=self.hp+10000
self.attack=self.attack+1000
longwang=Hore("longwang",5000000,100000)
longwang.uppng()
print(longwang.name)
print(longwang.hp) print(longwang.hp)
print(longwang.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