Python Project (Turtle Robot Maze) Error

I received the following syntax error.

File “robot_control_class.py”, line 150 s = “Moved robot " + motion + " for " + str(time) + " seconds at " str(speed) + " m/s”
^
SyntaxError: invalid syntax

Hi, yes, you receive an invalid syntax error when your syntax is incorrect.

The + should be in between the strings you are trying to concatenate.

1 Like

You are missing a + between " seconds at " and str(speed)

1 Like

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