https://studio.code.org/s/course3/stage/6/puzzle/1
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.