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
Answered by JustARatherRidi (209) [earned 5 cycles]
View Answer
GustavW (1)

@MATTHEWBECHTEL It's just some first order differential equations, and Euler is a numerical method of solving them. F and t are defined arrays. The error implies that the program doesn't understand the print command. If something was undefined, wouldn't that generate another error, like "undefined blabla" ?