Unexpected EOF while parsing

Im currently on this course https://www.codecademy.com/paths/computer-science/tracks/cspath-intro/modules/cspath-python-functions/lessons/intro-to-functions/exercises/review

But sometimes i keep getting this error File “script.py”, line 2


SyntaxError: unexpected EOF while parsing.

Even though the code seem to be right because i will click solution and the same code will appear so i don’t understand where i do wrong.

one of the code im having problem with sometimes is functions like

def repeat_stuff(stuff, num_repeats):

Somehow this won’t work all the time.

We will need to see your code to be of any help. Thanks for posting the link. That lets us check your code. We cannot see your code on that page, only our own.

1 Like