Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Nama: Greggory Gibrill Panelewen

Nim. :230211060032

Kelas: A

Blockly Puzzle

Blockly Maze

Blockly Maze #1

moveForward();

moveForward();

Blockly Maze #2

moveForward();

turnLeft();

moveForward();
turnRight();

moveForward();

Blockly Maze #3

while (notDone()) {

moveForward();

Blockly Maze #4

while (notDone()) {

moveForward();

turnLeft();

moveForward();

turnRight();

Blockly Maze #5

moveForward();

moveForward();

turnLeft();

while (notDone()) {

moveForward();

Blockly Maze #6

while (notDone()) {

moveForward();

if (isPathLeft()) {

turnLeft();

Blockly Maze #7

while (notDone()) {
moveForward();

if (isPathRight()) {

turnRight();

moveForward();

Blockly Maze #8

while (notDone()) {

if (isPathLeft()) {

turnLeft();

if (isPathRight()) {

turnRight();

moveForward();

Blockly Maze #9

while (notDone()) {

moveForward();

if (isPathForward()) {

moveForward();

} else {

if (isPathLeft()) {

turnLeft();

} else {

turnRight();

}
Blockly Maze #10

while (notDone()) {

if (isPathLeft()) {

turnLeft();

moveForward();

if (isPathLeft()) {

turnLeft();

moveForward();

if (isPathRight()) {

turnRight();

moveForward();

Blockly Bird

Blockly Bird #1

heading(45);

Blockly Bird #2

if (noWorm()) {
heading(0);
} else {
heading(90);
}

Blockly Bird #3
if (noWorm()) {
heading(300);
} else {
heading(60);
}

Blockly Bird #4

if (getX() < 80) {


heading(0);
} else {
heading(270);
}

Blockly Bird #5

penColour('#ffff00');
for (var count2 = 0; count2 < 3; count2++) {
for (var count = 0; count < 5; count++) {
moveForward(50);
turnRight(144);
}
penUp();
moveForward(150);
turnRight(120);
penDown();
}
penColour('#ffffff');
penUp();
turnLeft(90);
moveForward(100);
penDown();
for (var count3 = 0; count3 < 4; count3++) {
moveForward(50);
turnRight(90);
turnRight(90);
moveForward(50);
turnLeft(90);
turnLeft(45);
}

Blockly Bird #6

if (noWorm()) {
heading(345);
} else if (getY() < 80) {
heading(90);
} else {
heading(180);
}
Blockly Bird #7

if (getY() > 50) {


heading(225);
} else if (noWorm()) {
heading(315);
} else {
heading(180);
}

Blockly Bird #8

if (getX() < 40) {


heading(45);
} else if (noWorm()) {
heading(315);
} else if (getX() > 50 && getY() < 50) {
heading(135);
} else {
heading(45);
}

Blockly Bird #9

if (getX() > 20 && noWorm()) {


heading(180);
} else if (noWorm()) {
heading(285);
} else if (getY() < 70 && getX() < 40) {
heading(75);
} else {
heading(315);
}

Blockly Bird #10

penColour('#ffff00');
for (var count2 = 0; count2 < 3; count2++) {
for (var count = 0; count < 5; count++) {
moveForward(50);
turnRight(144);
}
penUp();
moveForward(150);
turnRight(120);
penDown();
}
penColour('#ffffff');
penUp();
turnLeft(90);
moveForward(100);
penDown();
for (var count3 = 0; count3 < 4; count3++) {
moveForward(50);
turnRight(90);
turnRight(90);
moveForward(50);
turnLeft(90);
turnLeft(45);
}

Blockly Turtle

Blockly Turtle #1
for (var count = 0; count < 4; count++) {
moveForward(100);
turnRight(90);
}

Blockly Turtle #2

for (var count = 0; count < 5; count++) {


moveForward(100);
turnRight(72);
}

Blockly Turtle #3

penColour('#ffff00');
for (var count = 0; count < 5; count++) {
moveForward(100);
turnRight(144);
}

Blockly Turtle #4

penColour('#ffff00');
for (var count = 0; count < 5; count++) {
moveForward(50);
turnRight(144);
}
penUp();
moveForward(150);
penDown();
moveForward(20)

Blockly Turtle #5

for (var count2 = 0; count2 < 4; count2++) {


for (var count = 0; count < 5; count++) {
penColour('#ffff00');
moveForward(50);
turnRight(144);
}
penUp();
moveForward(150);
turnRight(90);
penDown();
}

Blockly Turtle #6

for (var count2 = 0; count2 < 3; count2++) {


for (var count = 0; count < 5; count++) {
penColour('#ffff00');
moveForward(50);
turnRight(144);
}
penUp();
moveForward(150);
turnRight(120);
penDown();
}
turnLeft(90);
penUp();
penColour('#ffffff');
moveForward(100);
penDown();
moveForward(50);

Blockly Turtle #7

penColour('#ffff00');
for (var count2 = 0; count2 < 3; count2++) {
for (var count = 0; count < 5; count++) {
moveForward(50);
turnRight(144);
}
penUp();
moveForward(150);
turnRight(120);
penDown();
}
penColour('#ffffff');
penUp();
turnLeft(90);
moveForward(100);
penDown();
for (var count3 = 0; count3 < 4; count3++) {
moveForward(50);
turnRight(90);
turnRight(90);
moveForward(50);
turnLeft(90);
turnLeft(45);
}

Blockly Turtle #8

penColour('#ffff00');
for (var count2 = 0; count2 < 3; count2++) {
for (var count = 0; count < 5; count++) {
moveForward(50);
turnRight(144);
}
penUp();
moveForward(150);
turnRight(120);
penDown();
}
penColour('#ffffff');
penUp();
turnLeft(90);
moveForward(100);
penDown();
for (var count3 = 0; count3 < 4; count3++) {
moveForward(50);
turnRight(90);
turnRight(90);
moveForward(50);
turnLeft(90);
turnLeft(45);
}

Blockly Turtle #9

penColour('#ffff00');
for (var count2 = 0; count2 < 3; count2++) {
for (var count = 0; count < 5; count++) {
moveForward(50);
turnRight(144);
}
penUp();
moveForward(150);
turnRight(120);
penDown();
}
penColour('#ffffff');
penUp();
turnLeft(90);
moveForward(100);
penDown();
for (var count3 = 0; count3 < 4; count3++) {
moveForward(50);
turnRight(90);
turnRight(90);
moveForward(50);
turnLeft(90);
turnLeft(45);
}

Blockly Turtle #10

You might also like