Hey guys, I am very lost in this problem, mainly overwhelmed by the task. I have attempted it but I know for sure it doesn't work. I am trying to convert the numbers to string, would I require a list of sorts? or will the string itself behave like a list when i call it in the for statement?
Please Help as I just need to know how to approach this problem.
def digit_sum(n): for num in n: #for each number in n, convert it to string sum_of_numbers == 0 str(n) sum_of_numbers += int(n) return sum_of_numbers