def recursiveadd(x,sum1):
if x > 0:
sum1 += x
recursiveadd(x-1,sum1)
else:
return sum1
print recursiveadd(100,0)
Inserting a "print sum1" after the addition shows that sum1 is being increased, so I don't understand why the function returns None. The only thing I can think of is that sum1 is somehow being reset to 0 before being returned, but I have no idea why that would be.