4. digit sum
This is the error msg i get when my input it 434:
" Your function fails on digit_sum(434). It returns 22 when it should return 11."
I have put the code to python visualizer for a few times and it always showed that the return value is 11, so i have no idea what to do, thanks for any help!
data =  def digit_sum(n): cislo = str(n) for char in cislo: char = int(char) data.append(char) return (sum(data)) digit_sum(434)