digital.school.nz
  • home
  • links
  • Te Reo Maori
  • computer science
    • computational thinking
  • arcade.makecode
  • iterative design
  • VR/AR
  • Creative Thinking
  • minecraft
  • Generative Graphics
  • project
  • literacy
  • Robots
  • draw4pizza
  • cool technology
  • architecture
  • Project Management
  • digital resources
    • Scratch Jr
    • Scratch
    • Minecraft modding
    • Photoshop
    • Illustrator
    • After effects
    • Sketchup
    • Tinkercad
    • HTML/CSS
    • JavaScript
  • Year 11 Digital Technology
    • 91880 DIGITAL MEDIA
    • AS91063 FREEHAND SKETCHES
    • AS90857 SPEECH
  • Year 12 Digital Technology
    • AS91355 PLANNING TOOLS
  • Year 13 Digital Technology
    • AS91610 CONCEPT DESIGN
    • AS91903 DIGITAL MEDIA
    • AS91609 PROJECT MANAGEMENT
    • AS91615 TECH ESSAY
    • AS91617 TECH EXTERNAL ESSAY
    • AS91906 PROGRAMMING
  • NCEA - digital technology 2022

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  ©2022                                                                                                                                                                          email                                                                                                                                                                                                                                  
  • home
  • links
  • Te Reo Maori
  • computer science
    • computational thinking
  • arcade.makecode
  • iterative design
  • VR/AR
  • Creative Thinking
  • minecraft
  • Generative Graphics
  • project
  • literacy
  • Robots
  • draw4pizza
  • cool technology
  • architecture
  • Project Management
  • digital resources
    • Scratch Jr
    • Scratch
    • Minecraft modding
    • Photoshop
    • Illustrator
    • After effects
    • Sketchup
    • Tinkercad
    • HTML/CSS
    • JavaScript
  • Year 11 Digital Technology
    • 91880 DIGITAL MEDIA
    • AS91063 FREEHAND SKETCHES
    • AS90857 SPEECH
  • Year 12 Digital Technology
    • AS91355 PLANNING TOOLS
  • Year 13 Digital Technology
    • AS91610 CONCEPT DESIGN
    • AS91903 DIGITAL MEDIA
    • AS91609 PROJECT MANAGEMENT
    • AS91615 TECH ESSAY
    • AS91617 TECH EXTERNAL ESSAY
    • AS91906 PROGRAMMING
  • NCEA - digital technology 2022