This lesson is called songwriting with parameters.
We're going to be writing some songs here.
Sometimes the chorus is just a little bit different each time you sing it.
Do you remember Old Macdonald Had a Farm?
The chorus is slightly different for each animal.
And on that farm, he had a cow, e-i-e-i-o.
The small change in each chorus can be shown using something we call parameters.
Sometimes a function needs a parameter.
A parameter is an extra piece of information you can pass to a function to customize it
for a special need.
When you make ice cream sundaes with your friends, you are using a process similar to
parameters in a computer program.
The disk of vanilla ice cream might be the same for every sundae but when you ask your
friends which two toppings they'd like, you could get lots of different combinations.
Topping is the function name but each type of topping is a parameter.
Functions and parameters work together to make great computer programs and great sundaes
too.