Can someone please tell me why I'm getting this error?

'Oops, try again. Your function fails on digit_sum(434). It returns 8 when it should return 11.'

```
def digit_sum(n):
results = 0
for i in range(0,len(str(n))):
if n / (10**(i+1)) >= 1:
results += (n % (10 ** (i+1)))/(10**(i))
n = n // 10**(i+1)
else:
results += n/(10**i)
return results
```