Skip to content

Commit eb4b83c

Browse files
authored
turtle square - avoid drawing first side twice (#4966)
1 parent 2f99381 commit eb4b83c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/projects/turtle-square.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Did you notice the pattern of repeated blocks needed to draw a square? Try using
4747

4848
```blocks
4949
input.onButtonPressed(Button.A, function() {
50-
for(let index = 0; index <= 4; index++) {
50+
for(let index = 0; index <= 3; index++) {
5151
turtle.forward(1)
5252
turtle.turnRight()
5353
}
@@ -61,7 +61,7 @@ The turtle holds a **pen** that can turn on LEDs. If you add the ``||turtle:pen|
6161
```blocks
6262
input.onButtonPressed(Button.A, function() {
6363
turtle.pen(TurtlePenMode.Down)
64-
for(let index = 0; index <= 4; index++) {
64+
for(let index = 0; index <= 3; index++) {
6565
turtle.forward(1)
6666
turtle.turnRight()
6767
}

0 commit comments

Comments
 (0)