1 00:00:00,000 --> 00:00:05,339 one thing that computers are really good 2 00:00:02,100 --> 00:00:06,720 at is repeating commands as a person you 3 00:00:05,339 --> 00:00:09,420 get really bored if you had to do the 4 00:00:06,720 --> 00:00:11,250 same thing lots of times in a row but a 5 00:00:09,420 --> 00:00:13,620 computer can do the same thing millions 6 00:00:11,250 --> 00:00:14,790 or even billions of times and not get 7 00:00:13,620 --> 00:00:15,630 bored and be able to carry that out 8 00:00:14,790 --> 00:00:17,190 really well 9 00:00:15,630 --> 00:00:19,980 so for example if I wanted to wish 10 00:00:17,190 --> 00:00:21,960 everyone on facebook a happy birthday by 11 00:00:19,980 --> 00:00:23,760 sending them an email it might take me 12 00:00:21,960 --> 00:00:25,529 more than a century to actually write 13 00:00:23,760 --> 00:00:27,779 out all of those emails to everyone but 14 00:00:25,529 --> 00:00:30,330 with just a few lines of code i can have 15 00:00:27,779 --> 00:00:32,040 a system send an email to everyone on 16 00:00:30,330 --> 00:00:33,960 facebook wishing them a happy birthday 17 00:00:32,040 --> 00:00:35,520 so that's what loops are and why they're 18 00:00:33,960 --> 00:00:38,550 valuable and something that computers 19 00:00:35,520 --> 00:00:42,390 can do very well in this example your 20 00:00:38,550 --> 00:00:44,160 goal is going to be to move the bird now 21 00:00:42,390 --> 00:00:45,960 we're going to be able to use the repeat 22 00:00:44,160 --> 00:00:48,870 block in order to be able to do this 23 00:00:45,960 --> 00:00:51,300 very easily you can either do this by 24 00:00:48,870 --> 00:00:53,969 giving the computer and move forward 25 00:00:51,300 --> 00:00:56,579 command five times in order to advance 26 00:00:53,969 --> 00:00:59,340 the the bird one step each time to the 27 00:00:56,579 --> 00:01:01,469 pig or you can just tell the computer to 28 00:00:59,340 --> 00:01:03,329 move forward once and then tell it to 29 00:01:01,469 --> 00:01:05,820 repeat that five times and it will do 30 00:01:03,329 --> 00:01:08,700 the same thing so in order to do this 31 00:01:05,820 --> 00:01:11,310 you drag your move forward command and 32 00:01:08,700 --> 00:01:14,310 then you put it inside the repeat block 33 00:01:11,310 --> 00:01:15,960 and you can click on it and tell it how 34 00:01:14,310 --> 00:01:17,700 many times you want to repeat the block 35 00:01:15,960 --> 00:01:20,490 to tell how many steps you wanted to 36 00:01:17,700 --> 00:01:22,229 take forward now one more thing is you 37 00:01:20,490 --> 00:01:23,880 can put as many commands as you want 38 00:01:22,229 --> 00:01:25,740 inside the repeat block so in this 39 00:01:23,880 --> 00:01:28,710 example your tongue it to move forward 40 00:01:25,740 --> 00:01:35,689 and turn left which will do five times 41 00:01:28,710 --> 00:01:35,689 alright good job and have fun