A set of blocks that allow you to create and call functions. Functions are handy for structuring and reusing repetitive logic
![](/files/0.13/en/2260867225/2273051046/1/1674643595328/image_13.png)
You can define functions with or without a return value
![](/files/0.13/en/2260867225/2273051047/1/1674643618246/image_23.png)
You can define functions that accept parameters as input arguments
![](/files/0.13/en/2260867225/2275541071/1/1677059995650/gif_1_en.gif)
You can add a description to any function
![](/files/0.13/en/2260867225/2273051049/1/1674643662431/image_32.png)
Once you have defined a function, blocks will appear in the “Functions” section to call it
![](/files/0.13/en/2260867225/2273051050/1/1674643696450/image_42.png)
A block for calling a function without parameters that does not return a value
![](/files/0.13/en/2260867225/2260867232/2/1674643721759/image_5.png)
A block for calling a function with parameters and a return value
![](/files/0.13/en/2260867225/2260867233/2/1674643754603/image_6.png)
Example
Let’s create a function that calculates the length of the hypotenuse. It will take the length of the legs as parameters
![](/files/0.13/en/2260867225/2260867234/2/1674643782450/image_7.png)
Simple functions like this can be written shorter - move the hypotenuse calculation to “return”, and in the function settings uncheck “Allow operators”
![](/files/0.13/en/2260867225/2260867235/2/1674643806157/image_8.png)
Function call
![](/files/0.13/en/2260867225/2260867236/2/1674643839352/image_9.png)