Liceo A. Meucci – Aprilia (IT – LT)
Sequenze di istruzioni:
• moveForward();
• turnLeft();
• turnRight();
Istruzione 1
end
start
Istruzione 2
Istruzione 3
[Labirinto 1-5]
Ripeti (contando <n> volte) {
<sequenza di istruzioni>
}
for (var count = 0; count < 5; count++) {
moveForward();
turnLeft();
}
Istruzione 1
end
start
Istruzione 2
n
[Labirinto 6-9]
Ripeti fino a che (condizione) {
<sequenza di istruzioni>
}
while (notFinished()) {
moveForward();
turnLeft();
}
[Labirinto 10-13]
Se (condizione) {
<sequenza di istruzioni>
}
if (isPathForward()) {
moveForward();
}
If (test)
istruzioni
vero falso
end
start
[Labirinto 14-17]
Se (condizione) {
<sequenza di istruzioni>
} altrimenti {
<sequenza alternativa>
}
if (isPathForward()) {
moveForward();
} else {
turnLeft();
}
If <test>
<istruzioni>
vero
end
start
falso
<istruzioni>
(then) else
[Labirinto 18-20]
Istruzioni per muoversi con precisione
e disegnare
• moveForward(<n.pixel>);
• turnRight(<angle>);
• turnLeft(<angle>);
• penColour(’<colourcode');
• colour_random();
[Artista; Artista 2]

Coding

  • 1.
    Liceo A. Meucci– Aprilia (IT – LT)
  • 2.
    Sequenze di istruzioni: •moveForward(); • turnLeft(); • turnRight(); Istruzione 1 end start Istruzione 2 Istruzione 3 [Labirinto 1-5]
  • 3.
    Ripeti (contando <n>volte) { <sequenza di istruzioni> } for (var count = 0; count < 5; count++) { moveForward(); turnLeft(); } Istruzione 1 end start Istruzione 2 n [Labirinto 6-9]
  • 4.
    Ripeti fino ache (condizione) { <sequenza di istruzioni> } while (notFinished()) { moveForward(); turnLeft(); } [Labirinto 10-13]
  • 5.
    Se (condizione) { <sequenzadi istruzioni> } if (isPathForward()) { moveForward(); } If (test) istruzioni vero falso end start [Labirinto 14-17]
  • 6.
    Se (condizione) { <sequenzadi istruzioni> } altrimenti { <sequenza alternativa> } if (isPathForward()) { moveForward(); } else { turnLeft(); } If <test> <istruzioni> vero end start falso <istruzioni> (then) else [Labirinto 18-20]
  • 7.
    Istruzioni per muoversicon precisione e disegnare • moveForward(<n.pixel>); • turnRight(<angle>); • turnLeft(<angle>); • penColour(’<colourcode'); • colour_random(); [Artista; Artista 2]