Any idea why the following message appears:
Oops, try again. Does your digit_sum function take exactly one argument (a positive integer)? Your code threw a "'int' object is not iterable" error.
Note the code works fine with IDLE
Replace this line with your code. def digit_sum(n): total = 0 s =  s[:] = list(n) for x in s: total = int(x) + total return total number = input("Enter a number: ") print(digit_sum(number))