Oops, try again. Your function fails on digit_sum(434). It returns None when it should return 11.
Have hit a bit of a wall here. Need help, or at least a pointer in the right direction because I think I have got the gist of things, it's just that I feel that I'm missing something.
def digit_sum(n): total = 0 x = str(n) y = len(x) for a in x: total = total + 1 print x print y print total # str() # int() digit_sum(1234)