Error Message: Your function fails on digit_sum(434). It returns 4 when it should return 11.

```python```
def digit_sum(n):
num_str = str(n)
for i in range(len(num_str)):
total = 0
total += int(num_str[i])
return total
```

Error Message: Your function fails on digit_sum(434). It returns 4 when it should return 11.

```python```
def digit_sum(n):
num_str = str(n)
for i in range(len(num_str)):
total = 0
total += int(num_str[i])
return total
```

did you check existing topics? I answered the exact same question today:

the code is too shocking similiar, or is that just me?

Thank you for the link. But, I still manage to get the error somehow. Just that canâ€™t work on the solution for *return Total*