digital.school.nz
  • home
  • links
  • Te Reo Maori
  • computer science
    • computational thinking
  • arcade.makecode
  • iterative design
  • VR/AR
  • Creative Thinking
  • minecraft
  • Generative Graphics
  • TECH WEEK 2022
  • project
  • literacy
  • Pecha Kucha
  • Robots
  • architecture
  • Project Management

Picture

MINECRAFT TURTLE TRAINING

Picture

Welcome to computer craft turtle training
"Training Learners to program a turtle like a Ninja"


All turtle commands found here

JUNIOR STUDENT NOTE TAKER


Lesson 0 - Pre Programming

TASK 1 - Lightbot


Go to www.lightbot.com

and play the game

Try to finish it this lesson


Lesson 1 - Basic Programming

Lesson 1 - Hints

To create a program

Right click on a turtle

enter "edit first"

type your program

Hit Ctrl, then save
Hit Ctrl, then exit

Type first


Lesson 2 - Pseudo Code


Pseudo code means fake code

It helps when you are planning so that you don't have to worry about syntax (capital letters, ())

Pseudo code Example
go forward
turn left

Actual Code
turtle.forward()
turtle.turnLeft()

By the end of lesson 2 you should have all sections of the student note taker filled out for Lesson 1 and 2.


Lesson 3 - For Loops

Link to Hint Sheet

For Loops look like this

for a = 1 , 3 do
 turtle.forward()
end

This will move the turtle 3 squares forward()

Lesson 4 - Notepad ++




Download Link:

https://drive.google.com/open?id=0B6wQedSI4lsmSDQyTkZ1US0xZnM

Lesson 5 - While Loops

Hint Sheet




While Loops look like this

while turtle.detect() == false do
 turtle.forward()
end

This will move the turtle forward until it hits a wall








Lesson 6 - Code Sandwich

Code needs to be indented
and you need to ensure that you have an end

This:
for a = 1 , 3 do
while turtle.detect() == false do
turtle.forward()
end
turtle.turnLeft()
end

Should look like this:
for a = 1 , 3 do
 while turtle.detect() == false do
  turtle.forward()
 end
 turtle.turnLeft()
end

Lesson 7 - If Statements

Hint Sheet

Code looks like this

if turtle.detect() == true then
 turtle.up()
 turtle.forward()
 turtle.forward()
 turtle.down()
end

Lesson 8 - Code Commenting 1

--asks for the number of steps
io.write(“How many steps?”)

answer  = io.read()
--then walks that number of steps

for a = 1  , answer do

    turtle.forward()

end

Lesson 9 - Variables and User Prompting

Instruction Sheet

--asks for the number of steps
io.write(“How many steps?”)

answer  = io.read()
--then walks that number of steps

for a = 1  , answer do

    turtle.forward()

end

Lesson 10 - Code Commenting 2

--[[ This code will go forward once 
turtle.forward()
turtle.up()
--]
I like Cheese
hi mum
--]
--]]

turtle.forward()

Lesson 11 - Functions

Instruction Sheet


--[[ this function allows the turtle to go a certain number of steps forward]]--
function go (steps)

   for a = 1 , steps do
     turtle.forward()
   end
end


--going forward 6 steps
go(6)

Lesson 12 - Arrays

Instruction Sheet

Movement = {5, 10 , 12}

for a = 1 , table.getn(Movement) do
  for b = 1 , Movement[a] do
    turtle.forward()
  end
  turtle.turnLeft()


end

Lesson X - Arena Battles

 digital.school.nz by Marc Williams   ©2023                                                                                                                                                  email                                                                                                                                                                                                                                  
  • home
  • links
  • Te Reo Maori
  • computer science
    • computational thinking
  • arcade.makecode
  • iterative design
  • VR/AR
  • Creative Thinking
  • minecraft
  • Generative Graphics
  • TECH WEEK 2022
  • project
  • literacy
  • Pecha Kucha
  • Robots
  • architecture
  • Project Management