1 00:00:00,450 --> 00:00:02,550 in today's video tutorial we're going to 2 00:00:02,550 --> 00:00:05,370 be learning about the three repeat options 3 00:00:05,670 --> 00:00:07,770 that we have using the online version 4 00:00:07,770 --> 00:00:10,680 of scratch we'll also be introducing a 5 00:00:10,680 --> 00:00:13,140 new block called the touching block that 6 00:00:13,140 --> 00:00:14,880 can be found under the sensing tab 7 00:00:15,660 --> 00:00:17,430 so as you can see i have 8 00:00:17,430 --> 00:00:19,320 a new project open i have it 9 00:00:19,320 --> 00:00:20,160 named and it 10 00:00:20,220 --> 00:00:23,130 saved let's go ahead and navigate down 11 00:00:23,130 --> 00:00:25,440 to the control tab and select those 12 00:00:25,440 --> 00:00:28,080 three repeat block options that we have 13 00:00:28,950 --> 00:00:32,220 the three options are repeat a certain 14 00:00:32,220 --> 00:00:36,150 number of times repeat forever which would 15 00:00:36,150 --> 00:00:39,750 also be repeat continuously so nonstop and 16 00:00:39,750 --> 00:00:40,320 then re 17 00:00:40,320 --> 00:00:43,230 repeat until the repeat until a block 18 00:00:43,230 --> 00:00:45,270 is a little bit more interesting with 19 00:00:45,270 --> 00:00:46,770 this block what we're saying is that 20 00:00:46,770 --> 00:00:48,810 we want an action to be performed 21 00:00:49,290 --> 00:00:54,180 such as moving ten steps until 22 00:00:54,270 --> 00:00:57,600 another action happens so we'll get into 23 00:00:57,600 --> 00:00:58,980 this one in a minute i'm going 24 00:00:58,980 --> 00:01:00,240 to go up to this first block 25 00:01:00,240 --> 00:01:00,480 here 26 00:01:00,570 --> 00:01:04,260 the repeat ten times block so the 27 00:01:04,260 --> 00:01:06,150 action that i want repeated is ten 28 00:01:06,150 --> 00:01:09,450 steps by using this repeat a certain 29 00:01:09,450 --> 00:01:11,610 number of times a block i am 30 00:01:11,610 --> 00:01:13,560 saying that i want this cat sprite 31 00:01:13,560 --> 00:01:16,980 to move ten steps ten times so 32 00:01:16,980 --> 00:01:17,730 around ten 33 00:01:19,020 --> 00:01:21,270 there we go simple and of course 34 00:01:21,300 --> 00:01:23,099 i can change this number if i 35 00:01:23,099 --> 00:01:23,580 desire 36 00:01:27,600 --> 00:01:29,520 next let's take a look at the 37 00:01:29,520 --> 00:01:32,610 forever block again forever as i said 38 00:01:32,610 --> 00:01:34,680 just a moment ago as nonstop so 39 00:01:34,680 --> 00:01:36,300 when i plug this in the cat's 40 00:01:36,300 --> 00:01:38,010 going to move nonstop until he is 41 00:01:38,010 --> 00:01:38,940 right off the screen 42 00:01:43,140 --> 00:01:45,150 now let's go ahead and look at 43 00:01:45,150 --> 00:01:46,260 this last one 44 00:01:48,000 --> 00:01:50,460 so with the repeat until block what 45 00:01:50,460 --> 00:01:52,560 i want is for this cat to 46 00:01:52,560 --> 00:01:55,650 move ten steps and tell another action 47 00:01:55,710 --> 00:01:58,590 is performed and that's an action that 48 00:01:58,590 --> 00:02:01,320 you're going after program for two days 49 00:02:01,320 --> 00:02:03,240 example we're going to go down to 50 00:02:03,240 --> 00:02:05,040 the sensing tab and we're going to 51 00:02:05,040 --> 00:02:07,440 select the touching block to use 52 00:02:07,500 --> 00:02:09,060 this i need to drop it right 53 00:02:09,060 --> 00:02:10,919 here in this hexagon shape that's lit 54 00:02:10,919 --> 00:02:13,050 up and then i have to figure 55 00:02:13,050 --> 00:02:14,730 out what i want the action to 56 00:02:14,730 --> 00:02:16,260 be or in this case what i 57 00:02:16,260 --> 00:02:17,700 want the cat to touch 58 00:02:18,750 --> 00:02:20,670 for today i want the cat to 59 00:02:20,670 --> 00:02:23,550 touch another sprite so the cat will 60 00:02:23,550 --> 00:02:25,590 move ten steps until it touches a 61 00:02:25,590 --> 00:02:28,560 second sprite let's go down here to 62 00:02:28,560 --> 00:02:30,630 this panel and choose our second sprite 63 00:02:32,010 --> 00:02:33,600 how about the jellyfish 64 00:02:37,140 --> 00:02:39,270 i need a place the jellyfish directly 65 00:02:39,270 --> 00:02:41,550 in front of the cat otherwise he 66 00:02:41,550 --> 00:02:45,000 won't stop when he's supposed to 67 00:02:46,110 --> 00:02:47,640 so now that i have the jellyfish 68 00:02:47,850 --> 00:02:49,800 fish placed directly in front and gleaned 69 00:02:49,800 --> 00:02:51,240 a click back on the cat sprite 70 00:02:51,240 --> 00:02:53,490 so i have my code and then 71 00:02:53,490 --> 00:02:55,590 i have to go to this touching 72 00:02:55,590 --> 00:02:57,420 block and i have to select jellyfish 73 00:02:57,840 --> 00:02:59,520 so when i click on this i 74 00:02:59,520 --> 00:03:01,350 want the cat to move ten steps 75 00:03:01,380 --> 00:03:03,660 until he touches the jellyfish 76 00:03:05,580 --> 00:03:07,950 and there we go simple and that 77 00:03:07,950 --> 00:03:09,960 concludes today's video tutorial