[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.00,0:00:02.84,Default,,0000,0000,0000,,One of the most important concepts of computer science, Dialogue: 0,0:00:02.84,0:00:07.23,Default,,0000,0000,0000,,is how to define new commands;\Nhow to add your own words to the computer language. Dialogue: 0,0:00:08.57,0:00:13.07,Default,,0000,0000,0000,,Most computer languages have only about a hundred words or commands Dialogue: 0,0:00:13.07,0:00:18.25,Default,,0000,0000,0000,,and the art is to define your own new words out of these coding blocks. Dialogue: 0,0:00:18.25,0:00:20.20,Default,,0000,0000,0000,,We do this all the time at sports. Dialogue: 0,0:00:21.92,0:00:26.93,Default,,0000,0000,0000,,In basketball you learn how to dribble, how to do a lay-up and how to rebound. Dialogue: 0,0:00:26.93,0:00:30.91,Default,,0000,0000,0000,,Once you've learned these moves,\Nyou learn new moves Dialogue: 0,0:00:30.91,0:00:34.71,Default,,0000,0000,0000,,and put together these building blocks, \Nlike a pick and roll or give and go Dialogue: 0,0:00:34.71,0:00:37.50,Default,,0000,0000,0000,,and from there you can do more complex plays. Dialogue: 0,0:00:37.50,0:00:43.20,Default,,0000,0000,0000,,Once you learned that play and give it a name,\Neverybody on the team knows how to do it. Dialogue: 0,0:00:43.20,0:00:47.34,Default,,0000,0000,0000,,Simulary, once you learned a computer how to do an action once, Dialogue: 0,0:00:47.34,0:00:49.09,Default,,0000,0000,0000,,using these sequence of commands, Dialogue: 0,0:00:49.09,0:00:53.72,Default,,0000,0000,0000,,you can make up your own name for that action,\Nso it's easier to repeat it later. Dialogue: 0,0:00:53.72,0:00:58.27,Default,,0000,0000,0000,,When you define your own command and give it a name,\Nit's called a function. Dialogue: 0,0:00:59.61,0:01:00.87,Default,,0000,0000,0000,,If you are programming with blocks, Dialogue: 0,0:01:00.87,0:01:05.36,Default,,0000,0000,0000,,you can use functions if there is a set of actions\Nwhich you are gonna use a lot of times. Dialogue: 0,0:01:05.36,0:01:09.18,Default,,0000,0000,0000,,For example, you've written code to create a square, Dialogue: 0,0:01:09.18,0:01:13.34,Default,,0000,0000,0000,,You could define this as a function called "create a square". Dialogue: 0,0:01:13.34,0:01:18.93,Default,,0000,0000,0000,,Now you have a new block \Nthat you can use multiple times to create multiple squares. Dialogue: 0,0:01:19.82,0:01:23.35,Default,,0000,0000,0000,,A lot of simple functions can be used,\Nto create more complex patterns. Dialogue: 0,0:01:24.07,0:01:25.52,Default,,0000,0000,0000,,In the next puzzle, Dialogue: 0,0:01:25.52,0:01:28.11,Default,,0000,0000,0000,,the code you recently wrote to make a circle Dialogue: 0,0:01:28.11,0:01:31.84,Default,,0000,0000,0000,,is available to you as a new function\Nthat can make circles of different sizes. Dialogue: 0,0:01:31.84,0:01:36.31,Default,,0000,0000,0000,,Can you use it to help Elsa to create a new beautiful pattern in the snow?