Really hesitant to ask this question, but it appears that the answer key has an error - either that or I have a horrible misunderstanding of the pseudocode. Probably the latter, but thanks for any help you can give!
The second and third “you try it’s” for the nested if statements look wrong.
Here’s the second one:
IF (CAN_MOVE (forward)) ----this is a “yes” so it would do the if statement
IF (CAN_MOVE (left)) -----this is a “no” since it hasn’t moved forward yet
ROTATE_LEFT () -----skip
ROTATE_RIGHT () ---------would rotate right
MOVE_FORWARD () ------would move forward
ELSE ----would skip the whole else statement
MOVE_FORWARD () -----would move forward and crash
Can I get some help with this?