error:Oops, try again. Your function fails on digit_sum(434). It returns None when it should return 11.

So I figured to turn n into a str, and the hint reminded me I had to turn the characters of the string back to int. Can smn tell me why this doesnt work?

def digit_sum(n):
    for c in string_num:


you forgot to return the totalsum after you calculated it


Nice! Thank you :slight_smile: I can't believe I always focus on the hard stuff and not the small mistakes :slight_smile: