Commit d9a44e04 by BellCodeEditor

auto save

parent c1a5f5df
Showing with 13 additions and 0 deletions
class Hero: class Hero:
def __init__(self,name,hp,attack):
self.hp=hp
self.name = name
self.level=1
self.attack=attack
def uiu(self):
self.level=self.level+1
self.hp=self.hp+100
self.attack=self.attack+10
yase=Hero("wu",800,80)
yase.uiu()
print(yase.hp)
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