> For the complete documentation index, see [llms.txt](https://computational-thinking-in-room11.gitbook.io/room-112-dhs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://computational-thinking-in-room11.gitbook.io/room-112-dhs/software-development/practice-final-project/programming-a-move-procedure.md).

# Programming a Move Procedure

Now we want to turn your algorithm into a reusable procedure - there are 5 columns on this grid and one measure of our success is for the program to work for ANY size grid

Find the Functions Block -

![ We use the term procedure, functions or methods interchangeably at this level of CS.](/files/-Lv2geX3hmnWQtGoYOYP)

Click create a function and then title it moveDown - do not be distracted by the other options on the screen. And then hit done

![](/files/-Lv2h32bNlVxGqEl1v3L)

```
Inside the moveDown Function
//this is my fully realized moveDown function
    Repeat 4
        move boat 1
        pause 1000ms
    boat turn left 90
    boat move by 1
    pause 1000 ms
    boat turn left by 90
    
```

Now to test it by calling the function. When you return to the Functions tab you should see 1 block - the call moveDown

**TIP:**&#x57;hen we use a function we are calling it

```
On Start
    boat to 0,0
    turn boat left 90

A Button Pushed
    call moveDown
```

Test this code several times and make sure it is traversing each LED down the column. Do you need to adjust turns?&#x20;
