Hi, can somebody help me? I don't know what I am doing wrong here.
My plan is to convert the integer into a string. Then to split each individual number into a list. Convert each string in the list to integers. Then take the sum of the list.
Error: 'Your function fails on digit_sum(434). It returns None when it should return 11.'
def digit_sum(n): word = str(n) wordn = list(word) integers = [int(i) for i in wordn] answer = sum(integers) print answer print digit_sum(434)