WEBVTT 00:00:00.320 --> 00:00:03.740 One thing that computers are really good at is repeating commands. 00:00:03.740 --> 00:00:08.170 As a person, you'd get really bored if you had to do the same thing lots of times in a row. 00:00:08.170 --> 00:00:08.809 00:00:08.809 --> 00:00:12.849 But a computer can do the same thing millions or even billions of times, 00:00:12.849 --> 00:00:15.000 and not get bored and be able to carry that out really well. 00:00:15.500 --> 00:00:17.430 So for example if I wanted to wish 00:00:17.430 --> 00:00:20.960 everyone on Facebook a happy birthday by sending them an email, 00:00:20.960 --> 00:00:24.850 it might take me more than a century to actually write out all of those emails to everyone. 00:00:24.850 --> 00:00:25.269 00:00:25.269 --> 00:00:28.760 But with just a few lines of code, I can have a system 00:00:28.760 --> 00:00:32.229 send an email to everyone on Facebook wishing them a happy birthday. 00:00:32.229 --> 00:00:34.000 So that's what loops are, and why they're valuable, 00:00:34.500 --> 00:00:37.180 and something that computers can do very well. 00:00:37.180 --> 00:00:40.550 In this example your goal is going to be to move the bird 00:00:40.550 --> 00:00:44.940 to get the pig. Now we're gonna be able to use the "repeat" block 00:00:44.940 --> 00:00:49.210 in order to be able to do this very easily. You can either do this by 00:00:49.210 --> 00:00:52.219 giving the computer a "move forward" command 00:00:52.219 --> 00:00:57.079 five times in order to advance the bird one step each time to the pig. 00:00:57.079 --> 00:01:00.590 Or you can just tell the computer to "move forward" once, 00:01:00.590 --> 00:01:04.150 and then tell it to "repeat" that 5 times, and it will do the same thing. 00:01:04.150 --> 00:01:08.280 So in order to do this you drag your "move forward" command, 00:01:08.280 --> 00:01:11.729 and then you put it inside the "repeat" block. 00:01:11.729 --> 00:01:16.200 And you can click on it and tell it how many times you want to repeat the block 00:01:16.200 --> 00:01:19.970 to tell it how many steps you want it to take forward. Now one more thing is 00:01:19.970 --> 00:01:23.540 you can put as many commands as you want inside the "repeat" block. 00:01:23.540 --> 00:01:26.909 So in this example you're telling it to move forward and turn left, 00:01:26.909 --> 00:01:30.970 which it will do five times. Alright good job and have fun :-) 00:01:30.970 --> 00:01:31.220