1 00:00:13,010 --> 00:00:15,680 This lesson is called songwriting with parameters. 2 00:00:15,680 --> 00:00:18,350 We're going to be writing some songs here. 3 00:00:18,350 --> 00:00:21,960 Sometimes the chorus is just a little bit different each time you sing it. 4 00:00:21,960 --> 00:00:25,230 Do you remember Old Macdonald Had a Farm? 5 00:00:25,230 --> 00:00:27,350 The chorus is slightly different for each animal. 6 00:00:27,350 --> 00:00:32,870 And on that farm, he had a cow, e-i-e-i-o. 7 00:00:32,870 --> 00:00:40,190 The small change in each chorus can be shown using something we call parameters. 8 00:00:40,190 --> 00:00:42,280 Sometimes a function needs a parameter. 9 00:00:42,280 --> 00:00:46,900 A parameter is an extra piece of information you can pass to a function to customize it 10 00:00:46,900 --> 00:00:48,590 for a special need. 11 00:00:48,590 --> 00:00:53,760 When you make ice cream sundaes with your friends, you are using a process similar to 12 00:00:53,760 --> 00:00:56,550 parameters in a computer program. 13 00:00:56,550 --> 00:01:00,800 The disk of vanilla ice cream might be the same for every sundae but when you ask your 14 00:01:00,800 --> 00:01:06,290 friends which two toppings they'd like, you could get lots of different combinations. 15 00:01:06,290 --> 00:01:10,760 Topping is the function name but each type of topping is a parameter. 16 00:01:10,760 --> 00:01:15,780 Functions and parameters work together to make great computer programs and great sundaes 17 00:01:15,780 --> 00:01:15,940 too.