Rotate your device.
Turn off orientation lock in device settings.
Your browser is not supported. Please upgrade your browser to one of our supported browsers. You can try viewing the page, but expect functionality to be broken.
CS in Algebra curriculum and content is being deprecated. Within the next few months, this lab will no longer be available. Please check out Bootstrap: Algebra instead. Learn More.
Rotate your device.
Turn off orientation lock in device settings.
We've defined our own block called "fill 5", which is now in the Functions category. Use it to help me fill in this hole.
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
Hi, I'm Brina, an engineer at Instagram. A function is certain lines of code that you want to use over and over again, so instead of writing that code out everytime, you can just use one block.
We're going to learn how to define functions. Function definitions have a star in the corner. The name of the function is written on the top line.
The blocks that go inside the definition tell us what it does. So this function definition is called "fill 5" and it's made up of a "repeat" block and a "fill" block.
The definition sits on the workspace, but our farmer won't run the function until we drag out our "fill 5" function block from functions category.
Let's put the "fun" back in "FUNction!"