Hi there! Today we are going to learn about functions. Think of them as magic machines that save your time!
In coding, a function is a named block of code. It does one specific job whenever you ask it to.

Instead of writing the same steps over and over, you group them. You give that group a simple name.
To use a function, you just call its name. This makes your code neat, short, and easy to read.
✏️ Worked example
Let's write a function that greets a user. Instead of typing 'Hello!' and 'Welcome!' three times, we will make one function.
- First, we define our function. We will name it 'sayHello'.
- Next, we write the steps inside it: print 'Hello!' and print 'Welcome!'.
- Now, our function is saved in the computer's memory, waiting to be used.
- Finally, we call the function by writing 'sayHello()' three times in our code.
- The computer runs our saved steps each time, greeting three different users easily!

Want the full interactive lesson — quiz, animations, and Finn cheering them on?