[Tutor] TypeError: 'int' object is not callable
Emile van Sebille
emile at fenx.com
Wed May 16 22:43:55 CEST 2012
On 5/16/2012 1:17 PM Greg Christian said...
> def factors(n):
> L = 
> for i in range(1, int(n ** 0.5) + 1):
> if (n % i == 0):
> return L
... now you've completed defining the function factors...
> def main():
> factors = 0
... and here you create an integer of the same name...
> counter = 0
> L = 
> while len(L) < 50:
> counter += 1
> Tn = sum(L)
> x = factors(Tn)
... and here you attempt to call the interger factors passing it the
> #print x
Also, in the future please post the complete traceback -- it relly helps.
More information about the Tutor