Digit sum


#1

https://www.codecademy.com/courses/python-intermediate-en-rCQKw/0/4?curriculum_id=4f89dab3d788890003000096#


Why it is not a valid syntax?


Replace this line with your code.


#2

What the error message points to is the bad syntax.

for x in range( ... ):

for x in object:

Given that the rest of the code is actually correct, there would appear to be some copying going on here. The code is rather intuitive and would suggest the author knew something about syntax and math concepts. I hope you are learning something from this.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.