I'm trying to complete "Practice Makes Perfect", but I'm stuck. I've tried everything already and I still can't pass it. What am I doing wrong?
Here's my code:
def digit_sum(n): #function
x =  #list
for i in int(n): #looping
if i > 0: a # gr8r than 0
append.i(x) # add every number to the 'x' list
return sum(x) # adding everything in the list