design, write and debug programs that accomplish specific goals, including controlling or simulating physical systems; solve problems by decomposing them into smaller parts.
3.3a
LO: To call functions in a program.
We are going to call everything in the code editor window that solves a particular problem, a program. The problem to solve is the world, Hurdles 2.

Before we begin we must state some rules for the Hurdle worlds, the idea is to treat them as real hurdles - you want to jump over them, staying in the first row when not 'jumping'.
Plotting out the route on paper or on a whiteboard, what moves will Reeborg need?
#Year group or class #name #date #hurdles 2 #plotting out the route we can see that we will need to turn right at the top of the jump def turn_right(): turn_left() turn_left() turn_left() #write a function to complete the world def hurdles(): move() turn_left() move() turn_right() move() turn_right() move() turn_left() move() turn_left() move() turn_right() move() turn_right() move() turn_left() move() turn_left() move() turn_right() move() turn_right() move() turn_left() move() #delete the indent to complete the function and then call it using its name hurdles()
Using the step command you will be able to see how the code will jump to the turn_right() function, think about how much typing we have saved!
Eliminating typing, especially repetition, is a good way of looking for new functions to create - can you spot any in the program we have written?