Skip to content
  • Coding

    Predicting how our Bee Bots need to be programmed

    You have not allowed cookies and this content may contain cookies.

    If you would like to view this content please

    Giving our Bee Bots instructions to achieve a goal

    You have not allowed cookies and this content may contain cookies.

    If you would like to view this content please

    Checking to see if our instructions worked

    You have not allowed cookies and this content may contain cookies.

    If you would like to view this content please

    Year 4 - Coding with loops

    Year 4: What have you been learning about in coding?

    You have not allowed cookies and this content may contain cookies.

    If you would like to view this content please

    Year 5 - Coding with functions

    Before beginning our Coding, Year 5 learnt what functions are and how they can help us.
    Bill Gates explained that functions are a way that we can program pre-existing algorithms that are used more than once. By doing this, it can save a lot of time as we don't have to rewrite existing code again and can make our programming more efficient.

    Year 5 used real life examples which are repeated daily - such as brushing our teeth or opening our books and writing the date and learning objective - to show that in a similar way, our brains use functions. Once we know how to do a certain task, we can perform them as a habit or routine without even thinking.

    After writing some of these real life functions as a whole class, Year 5 began coding with them.
    They had to write the algorithm for drawing a square or collecting nectar for a bee, and then used these same algorithms as a function to repeat the action without rewriting the code all over again. 

    Take a look at the photos and videos below of both 5TD and 5AG using functions within their coding!

    Year 5 have been coding using functions, but what is a function?

    You have not allowed cookies and this content may contain cookies.

    If you would like to view this content please

    Functions

    You have not allowed cookies and this content may contain cookies.

    If you would like to view this content please

    Year 5 - Coding with Functions

    Coding with repeated algorithms

    You have not allowed cookies and this content may contain cookies.

    If you would like to view this content please

    Year 5 starting their journey of using functions! Here the children can be seen writing the code for two equal squares separated by 75 pixels. They had to recall their knowledge of loops from Year 4 (seen as the pink blocks within this image) to repeat the drawing of identical angles and sides 4 times. After this, they moved onto using a function for recalling algorithms which they had previously used, so that they didn't have to rewrite the same code over and over again. Pretty efficient coding!

    Using functions

    You have not allowed cookies and this content may contain cookies.

    If you would like to view this content please

    Year 5's first attempt at using functions to program previously used algorithms. The input of a function can be seen as the green blocks, whilst the algorithm for that functions can be seen at the bottom as a separate piece of code. If you look closely, you will notice that this is a very similar to the activity in the video above this once, however uses functions to ensure the children's coding is even more efficient.

    Using functions

    You have not allowed cookies and this content may contain cookies.

    If you would like to view this content please

    After creating an algorithm for drawing a square, 5TD and 5AG had to apply this to a function so that they could repeat the input in a more efficient way.

    Coding functions

    You have not allowed cookies and this content may contain cookies.

    If you would like to view this content please

    After creating an algorithm for drawing a square, 5TD and 5AG had to apply this to a function so that they could repeat the input in a more efficient way.

    Using functions

    You have not allowed cookies and this content may contain cookies.

    If you would like to view this content please

    The children applied the function block (green blocks) to reuse a piece of code that they had already used in a previous algorithm.

    Editing functions

    You have not allowed cookies and this content may contain cookies.

    If you would like to view this content please

    Adapting or editing previously used functions to achieve a new goal. Here the Year 5s adapted a previously used function - drawing a regular quadrilateral - very slightly to draw a new shape - hexagons. They had to use their knowledge of angles to ensure that the function would draw a shape with 6 equal sides rather than 4.

    Adding in individual steps to debug and explore where our algorithm is incorrect

    You have not allowed cookies and this content may contain cookies.

    If you would like to view this content please

    By working one step at a time, Year 5 were able to gradually work towards achieving their goal; they were able to see which parts of their algorithm were accurate and then debug and adapt their code if things went wrong.

    Checking completed algorithms

    You have not allowed cookies and this content may contain cookies.

    If you would like to view this content please

    Here the children can be seen 'running' their completed algorithms to check if they were precise and achieved the intended goals. The Year 5s had to combine their knowledge of loops (pink blocks) which they learnt in Year 4, with their new understanding of functions. Impressive coding everyone!

    Year 6

    When starting their coding teaching sequence, Year 6 began by 'paper' and 'concrete coding'. This is where an algorithm is written and then physically acted on, rather than programmed into a computer. By doing this, the children were able to understand that an algorithm is actually just a set of precise instructions.