Why it can not pass?


#1



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

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


def digit_sum(n):
    a = 0
    for i in str(n):
        a = a + int(i)
    print a


#2

HI instead of print you should use return on this line

print a

#3

thank you so much for your help!