WEBVTT 00:00:00.000 --> 00:00:05.339 one thing that computers are really good 00:00:02.100 --> 00:00:06.720 at is repeating commands as a person you 00:00:05.339 --> 00:00:09.420 get really bored if you had to do the 00:00:06.720 --> 00:00:11.250 same thing lots of times in a row but a 00:00:09.420 --> 00:00:13.620 computer can do the same thing millions 00:00:11.250 --> 00:00:14.790 or even billions of times and not get 00:00:13.620 --> 00:00:15.630 bored and be able to carry that out 00:00:14.790 --> 00:00:17.190 really well 00:00:15.630 --> 00:00:19.980 so for example if I wanted to wish 00:00:17.190 --> 00:00:21.960 everyone on facebook a happy birthday by 00:00:19.980 --> 00:00:23.760 sending them an email it might take me 00:00:21.960 --> 00:00:25.529 more than a century to actually write 00:00:23.760 --> 00:00:27.779 out all of those emails to everyone but 00:00:25.529 --> 00:00:30.330 with just a few lines of code i can have 00:00:27.779 --> 00:00:32.040 a system send an email to everyone on 00:00:30.330 --> 00:00:33.960 facebook wishing them a happy birthday 00:00:32.040 --> 00:00:35.520 so that's what loops are and why they're 00:00:33.960 --> 00:00:38.550 valuable and something that computers 00:00:35.520 --> 00:00:42.390 can do very well in this example your 00:00:38.550 --> 00:00:44.160 goal is going to be to move the bird now 00:00:42.390 --> 00:00:45.960 we're going to be able to use the repeat 00:00:44.160 --> 00:00:48.870 block in order to be able to do this 00:00:45.960 --> 00:00:51.300 very easily you can either do this by 00:00:48.870 --> 00:00:53.969 giving the computer and move forward 00:00:51.300 --> 00:00:56.579 command five times in order to advance 00:00:53.969 --> 00:00:59.340 the the bird one step each time to the 00:00:56.579 --> 00:01:01.469 pig or you can just tell the computer to 00:00:59.340 --> 00:01:03.329 move forward once and then tell it to 00:01:01.469 --> 00:01:05.820 repeat that five times and it will do 00:01:03.329 --> 00:01:08.700 the same thing so in order to do this 00:01:05.820 --> 00:01:11.310 you drag your move forward command and 00:01:08.700 --> 00:01:14.310 then you put it inside the repeat block 00:01:11.310 --> 00:01:15.960 and you can click on it and tell it how 00:01:14.310 --> 00:01:17.700 many times you want to repeat the block 00:01:15.960 --> 00:01:20.490 to tell how many steps you wanted to 00:01:17.700 --> 00:01:22.229 take forward now one more thing is you 00:01:20.490 --> 00:01:23.880 can put as many commands as you want 00:01:22.229 --> 00:01:25.740 inside the repeat block so in this 00:01:23.880 --> 00:01:28.710 example your tongue it to move forward 00:01:25.740 --> 00:01:35.689 and turn left which will do five times 00:01:28.710 --> 00:01:35.689 alright good job and have fun