remainder = 0
def digit_sum(n):
for number in len(n):
if len(n) != 0:
number%10 = remainder
number //10 = remain
remainder = remainder + remainder
return remain

it comes the following error : Did you create a function called digit_sum? Your code threw a "global name 'digit_sum' is not defined" error.



you cannt do assignments like:

number%10 = remainder

The variable you want to assign a value to has to be on the left.

I am not sure if there are more errors. Try to include the formating in your post with the "Preformated text" button.