https://www.codecademy.com/courses/python-intermediate-en-rCQKw/0/4?curriculum_id=4f89dab3d788890003000096

Hi everyone, could you help solve my problem?

I think my idea is right, but it dose not work.

```
def digit_sum(n):
i=0
sum=0
while (n>=10):
n/=10.0
i+=1
for item in range(i+1):
sum+=int(n)
n=(n-int(n))*10.0
return sum
```