In a bit of a pickle with an error(s?) on 15.4... I get an error in the top-right pane regarding my syntax at the beginning of the "for" loop, but the Codecademy pop-up error at the bottom of the screen says it's a "global error"...and then proceeds to ask me if I have created a function called "digit_sum", which is the first line of my code. So, due to the mixed messages, I'm unsure where to start fixing this. Any thoughts would be great. Thanks!
def digit_sum(n): i=1 total=0 for i<=n: i*=10 num=n%i total+=num return total