Commit 32594fe8 by BellCodeEditor

save project

parent 22354288
Showing with 18 additions and 0 deletions
class Hole:
def __init__(self,name,sudu,gongji,shenming):
self.lkj=1
self.name=name
self.sudu=sudu
self.gongji=gongji
self.shenming=shenming
def abc(self):
self.lkj=self.lkj+1
self.sudu=self.sudu+150
self.gongji=self.gongji+200
self.shenming=self.shenming+300
lanseyaoji=Hole("蓝色妖姬",6000,150,200)
hongsefenbao=Hole("红色风暴",200,400,500)
lanseyaoji.abc()
print(lanseyaoji.shenming)
\ 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