Math · Foundational · Lesson 9 of 9
Functions
Name it once, use it everywhere
An interactive lesson with 7 steps, about 6 minutes: you predict, drag and solve, with instant feedback on every answer. It runs in your browser and needs JavaScript.
What you’ll learn
- A function is a named, reusable piece of code; def defines it, calling runs it.
- Arguments fill the function’s variables; return hands back a value.
- Functions avoid repetition; recursive functions call themselves on smaller cases.
Steps
- Making your own instructions
- Watching a call
- A function of a function
- A flower from squares
- Why bother?
- A function that calls itself
- A recursive sum