invalid syntax
GustavW (1)

Hi everyone.
I get "invalid syntax" on this:
for i in range(1, n)
print (t[i], F[i])
..where t, F and n of course are defined. Why the error message?

You are viewing a single comment. View All
JustARatherRidi (209)

Currently, the SyntaxError being raised in your repl is because you've left out a closing parenthesis on line 28. So line 28 should look like:


Change that, and the code seems to be working fine.

GustavW (1)

Yeah I wrote that expression "unfactorized", and then it worked. Of course it was something stupid like that. Thanks for checking the code!