Commit 00afa4a2 by BellCodeEditor

save project

parent 22354288
Showing with 14 additions and 0 deletions
class hero():
def __init__(self,name,hp,gongji):
self.dengji=1
self.name=name
self.hp=hp
self.gongji=gongji
def aua(self):
self.dengji=self.dengji+1
self.hp=self.hp+30
self.gongji=self.gongji+10
lan=hero("澜",180,70)
aua()
print(lan.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