Commit d0ff92a8 by BellCodeEditor

save project

parent 1ebff5c1
Showing with 19 additions and 0 deletions
class SB:
def __init__(self,level,name,hp,attack):
self.level = level
self.name = name
self.hp = hp
self.attack = attack
def a(self):
self.name=self.name+"是SB"
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attack+4
a=SB(1,"张老师",100,250)
print(a.hp)
a.A()
print(a.hp)
\ 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