Sep-12-2019, 10:58 PM
Good evening....
Can someone please tell me what I am doing wrong....I test this out on the CLI and it seems to work yet when I have it in my .py script I get the following error with respect to line 12:
TypeError: 'int' object is not callable
Can someone please tell me what I am doing wrong....I test this out on the CLI and it seems to work yet when I have it in my .py script I get the following error with respect to line 12:
TypeError: 'int' object is not callable
#!/usr/bin/env python3 2 import random 3 def main(): 4 c = [] 5 d = [] 6 for k in range(14): 7 tmp = []; sum = 0 8 for i in range(4): 9 m = random.randint(0,4) 10 tmp.append(m) 11 c.append(tmp) 12 d = sum(tmp) 13 14 return(c, d)Thank you!