Commit 629baf7a by BellCodeEditor

save project

parent 22354288
Showing with 17 additions and 0 deletions
class Hero:
def __init__(self,name,aaa,bbb,ccc):
self.aaa=aaa
self.name=name
self.bbb=bbb
self.ccc=ccc
def upgrade(self):
self.aaa=dayu.aaa+100
self.bbb=dayu.bbb+100
self.ccc=dayu.ccc+100
dayu = Hero("大鱼",300,100,1)
xiaoyu = Hero("小鱼",100,1,1)
dayu.upgrade()
print(dayu.aaa)
print(dayu.bbb)
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