What is a function in programming? A function is a way to group code to make repeating sections easier to manage. For example: a filing cabinet is a place to store paperwork. Each drawer of the filing cabinet has a label or name that describes the paperwork inside. This is the same with functions. Each function is labeled with a name that describes the code inside the function.
Look at the image with this instruction. If we were reading it like an English sentence, it would say "to dance means to skate fast forward, spin right, then skate slow forward, and finish with a spin right." Dance is the label of the function. If we look in the functions category in Ozobot Blockly, there is a block that says dance. When this block is added to a program, we are calling the function. That means when we run the program, the blocks inside the dance function will run.
You will start by planning three different functions on the Functions Planning Sheet. This lesson focuses on moves a singer might do when performing on stage. Your three functions might be called dance, sing, and moonwalk, or you can choose other descriptive names.
Complete your Functions Planning Sheet.