-
Introduction
In this section you will learn about the strategy we have followed to teach our students programming in a simple and fun way. Learning to code can be a motivating activity.
-
The DEMETER I language
In this section you will learn about the basic structures of our programming language. We call this set of instructions DEMETER I.
-
The DEMETER II language
In this section you will learn about the evolution of the initial DEMETER I instruction set. We will call the full language DEMETER II. In addition to having new instructions, the minefields have new elements that increase the difficulty.
The DEMETER I language
The DEMETER language has been divided into two parts, DEMETER I and DEMETER II. The DEMETER I language will have simple commands while the DEMETER II language will have more complex orders.
We are going to start working on the simplest orders, which are the sequential statements. Below are three very simple commands that we are going to give the robot, such as turn right and left and move forward.
Sequential statements
Let’s see these orders in depth:
- TR statement:
- TR -TURN RIGHT
Action: The rover will turn right. The rover will turn right within the same square.
- TL statement:
- TL – TURN LEFT
Action: The rover will turn left. The rover will turn left within the same square.
- A statement:
- A – ADVANCE
Action: The rover will advance one square
Therefore. The program:
- A
- A
- TR
The rover will advance two squares and turn right.
Iterative statement
To solve practically all the exercises that are going to be proposed, iterative statements (while or for) will be needed. These types of statements exist in all programming languages and even in scripting languages.
Only these two types of statements will be seen in DEMETER I since students have to use simplified tools.
The first statement is the while statement:
- WHILE statement:
WHILE NB
[other statements]
END
Action: DEMETER rover will do [other statements] while there is nothing blocking it.
The next statement is the for statement:
- FOR statement:
FOR X
[other statements]
END
Action: DEMETER rover will do [other statements] X times, where X is a number.
Once we know the language we can solve exercises like the following:
In this exercise the objective will be to enter the minefield and exit through the exit in the least number of steps.
Mines and obstacles
For the student to use the most appropriate statements and the challenges to be more fun, the boards will have mines and obstacles. In the following minefield you can see how the mines have been placed in the minefield:
For the rover, an obstacle can be the limit of the minefield or also blocks like the ones that can be seen in the following figure:
All exercises will use the same minefield. However, in the DEMETER I and II language we will use obstacles, mines and other resources to make the programming more complex.