A deposit and withdrawal programming(입/출금 프로그램)
2019.01.08
Object orientation def person_init(name, money): obj = {'name': name, 'money': money} obj['give_money'] = Person[1] obj['get_money'] = Person[2] obj['show'] = Person[3] return obj def give_money(self, other, money): self['money'] -= money other['get_money'](other, money) def get_money(self, money): self['money'] += money def show(self): print('{} : {}'.format(self['name'], self['money'])) Person..