So, the code is working totally fine in my Python 3. However, on codeacademy I keep getting "Oops, try again. Your function fails on digit_sum(434). It returns None when it should return 11."
Can someone tell me please what is the problem? I really don't understand how it can work fine in Python 3 but not on codeacademy
def digit_sum(n): n = str(n) sumup = 0 for x in n: x = int(x) sumup += x print (sumup)