Write an instruction that turns a robot off if a robot is


Write an instruction that turns a robot off, if a robot is completely surrounded by walls, unable to move in any direction.

If the robot is not surrounded, it should execute this instruction by leaving itself turned on, and by remaining on the same corner, facing the same direction in which it started.

Name this instruction turnOffifSurrounded. Hint: To write this instruction correctly, you will need to include a turnOff inside it.

This combination is perfectly legal, but it is the first time that you will use a turnOff instruction outside the main task block.

Request for Solution File

Ask an Expert for Answer!!
Dissertation: Write an instruction that turns a robot off if a robot is
Reference No:- TGS01564481

Expected delivery within 24 Hours