The Great Robot Race

So I am at the point of testing my full code and I keep getting this error.(
I know what the error is but I don’t know how to fix it.

SyntaxError: invalid syntax
$ python3
  File "", line 23
    num_of_turns += 1
SyntaxError: invalid syntax

That line of code seems ok, but syntax errors can sometimes refer to lines just before where the error shows up.
for instance, if the prior bit of code didn’t have the correct number of brackets, it might be thinking this line was intended to be part of that.

hope that helps