1 00:00:00,320 --> 00:00:03,740 One thing that computers are really good at is repeating commands. 2 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. 3 00:00:08,170 --> 00:00:08,809 4 00:00:08,809 --> 00:00:12,849 But a computer can do the same thing millions or even billions of times, 5 00:00:12,849 --> 00:00:15,000 and not get bored and be able to carry that out really well. 6 00:00:15,500 --> 00:00:17,430 So for example if I wanted to wish 7 00:00:17,430 --> 00:00:20,960 everyone on Facebook a happy birthday by sending them an email, 8 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. 9 00:00:24,850 --> 00:00:25,269 10 00:00:25,269 --> 00:00:28,760 But with just a few lines of code, I can have a system 11 00:00:28,760 --> 00:00:32,229 send an email to everyone on Facebook wishing them a happy birthday. 12 00:00:32,229 --> 00:00:34,000 So that's what loops are, and why they're valuable, 13 00:00:34,500 --> 00:00:37,180 and something that computers can do very well. 14 00:00:37,180 --> 00:00:40,550 In this example your goal is going to be to move the bird 15 00:00:40,550 --> 00:00:44,940 to get the pig. Now we're gonna be able to use the "repeat" block 16 00:00:44,940 --> 00:00:49,210 in order to be able to do this very easily. You can either do this by 17 00:00:49,210 --> 00:00:52,219 giving the computer a "move forward" command 18 00:00:52,219 --> 00:00:57,079 five times in order to advance the bird one step each time to the pig. 19 00:00:57,079 --> 00:01:00,590 Or you can just tell the computer to "move forward" once, 20 00:01:00,590 --> 00:01:04,150 and then tell it to "repeat" that 5 times, and it will do the same thing. 21 00:01:04,150 --> 00:01:08,280 So in order to do this you drag your "move forward" command, 22 00:01:08,280 --> 00:01:11,729 and then you put it inside the "repeat" block. 23 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 24 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 25 00:01:19,970 --> 00:01:23,540 you can put as many commands as you want inside the "repeat" block. 26 00:01:23,540 --> 00:01:26,909 So in this example you're telling it to move forward and turn left, 27 00:01:26,909 --> 00:01:30,970 which it will do five times. Alright good job and have fun :-) 28 00:01:30,970 --> 00:01:31,220