• Home
  • basic
  • loops
  • while loops
  • if statements
  • variables
  • functions
  • arrays

TASK

​Place your turtle on the starting point and program using loops (similar code merged together and repeated) to reach the end of the path, while building a small bridge


DEFINITION

Simplified lines of code that completes a much greater task

eg:
for a = 1 , 4 do (new line)
turtle.placeDown() (new line)
end

*note*
“for a = 1 , 4 do” means the code that follows will be repeated 4 times and must follow with an end. So if you were to use turtle.foward() instead the turtle would move forward 4 times instead of rewriting turtle.forward() 4 times on its own. 

If the turtle had to move forward 100 spaces, instead of writing 100 lines of turtle.forward() code you only need 3 lines of code.
This makes coding quicker, more efficient & less opportunity for mistakes. 
Try it for yourself!  


LOOPS - MINECRAFT WORLD EXAMPLE VIDEO


MAP

Picture

Minecraft Turtle Codes

Picture

AC DIGITAL

Proudly powered by Weebly
  • Home
  • basic
  • loops
  • while loops
  • if statements
  • variables
  • functions
  • arrays