How to learn to program in a simple and funny way. Learn2program

A new sequential instruction

Since our rover is an antipersonnel mine detector and deactivator rover, the rover has been equipped with a new instruction (DEACT) that will deactivate the mine just in front of the rover.

A new sequential instruction

 

  • DEACT Instruction
    DEACT

Action: The rover will deactivate a mine in the square in front of it.

Here is an exercise that combines sequential instructions with iterative instructions and also uses the new sequential DEACT instruction:

The solution to this exercise will be the following one:


WHILE NB
   DEACT
   A
END
TL
FOR 12
   DEACT
   A
END
TR
A

 

The Demeter Project