Programming for kids - Course 3 Bee Functions

Let us look at the Sixth stage of the third course in code studio. You will learn how to create and use functions. We will learn how to create a separate code block as a function and use it in the main program.  There are 11 levels, all coding exercises. You will actually write code for a function.

Below are the images of maze in each level along with the code needed to complete that level.
 This is the first level in this stage. The bee will move towards the flower and collect nectar 3 times each. The code displayed here shows how it is done. We will use a similar example and create a function in the next level.

Here in this level collecting nectar two times is converted as a function which is coded separately and the name of the function is included in the main program.

Here get5 is a function defined which collects nectar five times. The name of the function get5 is used within the main program.

Here a few movements are defined as a function. These movements are repeated again and again, therefore coding them separately as a function will reduce the amount of coding in the main program.

Level 5

Level 6

 From this level onward you are asked to code the function. This will help you to learn how the coding for a function is done. 

Level 7

Level 8

Level 9

Level 10

Level 11