okay, so we have a function digit_sum which has a parameter `n`

, which will hold a bunch of numbers:

```
def digit_sum(n):
print n
print digit_sum(12345)
```

now the problem is that we can't loop over a integer, look:

```
def digit_sum(n):
for i in n:
print i
print digit_sum(12345)
```

this will result in an error because integers are not iterable. however, strings are so what we can do is casting `n`

to a string:

```
def digit_sum(n):
for i in str(n):
print i
print digit_sum(12345)
```

now it works, but doing math with strings sucks, so inside the loop we need to cast the integer back to a integer (you can achieve this with `int()`

, i hope this helps you further

this is a forum, the people helping you can sometimes be occupied with other thigns