Blockly Coding Tasks
Example 1
This will be marked as correct, however, it is not recommended that you add any code outside of the function. In these sort of tasks, it is intended that all of your programming should be completed inside the function.
Coding tasks - Intro
Recommended practice
Functions, Procedures and Subroutines