Hey guys so I am getting this "TypeError: 'int' object is not callable" error when I run this code, I did some research and I think it's something with my variable naming? Could someone please explain to me what is wrong?
class account(object):
def set(self, bal):
self.balance = bal
def balance(self):
return balance
Here is my example run:
>>> a = account()
>>> a.set(50)
>>> a.balance()
Traceback (most recent call last):
File "<pyshell#12>", line 1, in <module>
a.balance()
TypeError: 'int' object is not callable