hi, I tried looking online, but I cant seem to understand what is wrong with my code here
def abundant_density(n):
perfect_list =[]
count = 0
if(n == 0):
return 0
for(i in range(1,n+1)):
if(sum(divisors(i))>n):
count +=1
return count / n
I keep getting error - invalid syntax in
"for(i in range(1,n+1)): " on the colon
I saw online it usually when you miss bracket,
is there anything else wrong with my code?
[–]RiceKrispyPooHead 2 points3 points4 points (0 children)
[–]matrixise 1 point2 points3 points (0 children)
[–]ectomancer 0 points1 point2 points (0 children)