[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.32,0:00:03.74,Default,,0000,0000,0000,,One thing that computers are really good\Nat is repeating commands. Dialogue: 0,0:00:03.74,0:00:08.17,Default,,0000,0000,0000,,As a person, you'd get really bored if you\Nhad to do the same thing lots of times in a row. Dialogue: 0,0:00:08.17,0:00:08.81,Default,,0000,0000,0000,, Dialogue: 0,0:00:08.81,0:00:12.85,Default,,0000,0000,0000,,But a computer can do the same thing\Nmillions or even billions of times, Dialogue: 0,0:00:12.85,0:00:15.00,Default,,0000,0000,0000,,and not get bored and be able to carry\Nthat out really well. Dialogue: 0,0:00:15.50,0:00:17.43,Default,,0000,0000,0000,,So for example if I wanted to wish Dialogue: 0,0:00:17.43,0:00:20.96,Default,,0000,0000,0000,,everyone on Facebook a happy birthday by\Nsending them an email, Dialogue: 0,0:00:20.96,0:00:24.85,Default,,0000,0000,0000,,it might take me more than a century to\Nactually write out all of those emails to everyone. Dialogue: 0,0:00:24.85,0:00:25.27,Default,,0000,0000,0000,, Dialogue: 0,0:00:25.27,0:00:28.76,Default,,0000,0000,0000,,But with just a few lines of code, I can have\Na system Dialogue: 0,0:00:28.76,0:00:32.23,Default,,0000,0000,0000,,send an email to everyone on Facebook\Nwishing them a happy birthday. Dialogue: 0,0:00:32.23,0:00:34.00,Default,,0000,0000,0000,,So that's what loops are, and why they're\Nvaluable, Dialogue: 0,0:00:34.50,0:00:37.18,Default,,0000,0000,0000,,and something that computers can do very well. Dialogue: 0,0:00:37.18,0:00:40.55,Default,,0000,0000,0000,,In this example your goal is going to be\Nto move the bird Dialogue: 0,0:00:40.55,0:00:44.94,Default,,0000,0000,0000,,to get the pig. Now we're gonna be able to use the "repeat" block Dialogue: 0,0:00:44.94,0:00:49.21,Default,,0000,0000,0000,,in order to be able to do this very\Neasily. You can either do this by Dialogue: 0,0:00:49.21,0:00:52.22,Default,,0000,0000,0000,,giving the computer a "move forward"\Ncommand Dialogue: 0,0:00:52.22,0:00:57.08,Default,,0000,0000,0000,,five times in order to advance the bird\None step each time to the pig. Dialogue: 0,0:00:57.08,0:01:00.59,Default,,0000,0000,0000,,Or you can just tell the computer to\N"move forward" once, Dialogue: 0,0:01:00.59,0:01:04.15,Default,,0000,0000,0000,,and then tell it to "repeat" that 5\Ntimes, and it will do the same thing. Dialogue: 0,0:01:04.15,0:01:08.28,Default,,0000,0000,0000,,So in order to do this you drag your\N"move forward" command, Dialogue: 0,0:01:08.28,0:01:11.73,Default,,0000,0000,0000,,and then you put it inside the\N"repeat" block. Dialogue: 0,0:01:11.73,0:01:16.20,Default,,0000,0000,0000,,And you can click on it and tell it how\Nmany times you want to repeat the block Dialogue: 0,0:01:16.20,0:01:19.97,Default,,0000,0000,0000,,to tell it how many steps you want it to\Ntake forward. Now one more thing is Dialogue: 0,0:01:19.97,0:01:23.54,Default,,0000,0000,0000,,you can put as many commands as you\Nwant inside the "repeat" block. Dialogue: 0,0:01:23.54,0:01:26.91,Default,,0000,0000,0000,,So in this example you're telling it to\Nmove forward and turn left, Dialogue: 0,0:01:26.91,0:01:30.97,Default,,0000,0000,0000,,which it will do five times. Alright good\Njob and have fun :-) Dialogue: 0,0:01:30.97,0:01:31.22,Default,,0000,0000,0000,,