1 00:00:00,100 --> 00:00:00,980 Great! 2 00:00:00,980 --> 00:00:02,440 We've caught a codfish! 3 00:00:02,440 --> 00:00:07,510 Did you know if you feed a codfish to a dolphin, the dolphin will guide you to a shipwreck 4 00:00:07,510 --> 00:00:09,550 where there may be treasure? 5 00:00:09,550 --> 00:00:11,610 We must be getting closer. 6 00:00:11,610 --> 00:00:17,510 The next set of puzzles are bound to be trickier, so we better learn some more coding skills. 7 00:00:17,510 --> 00:00:18,510 What's this? 8 00:00:18,510 --> 00:00:19,920 A cave? 9 00:00:19,920 --> 00:00:21,390 Welcome, adventurers! 10 00:00:21,390 --> 00:00:22,660 My name is Squid. 11 00:00:22,660 --> 00:00:28,000 I noticed you were using the same set of commands over and over in some of the last puzzles. 12 00:00:28,000 --> 00:00:29,840 Must've been a bit tiresome. 13 00:00:29,840 --> 00:00:33,890 Do you ever wish you had a way to do something over and over again like, you know, 14 00:00:33,890 --> 00:00:37,760 washing dishes or brushing your teeth without getting tired or bored? 15 00:00:37,760 --> 00:00:39,219 That would be nice. 16 00:00:39,219 --> 00:00:45,049 Computers are really good at doing the same thing over and over again using coding loops. 17 00:00:45,049 --> 00:00:49,159 When you want your program to do the same instructions many times, you can use a loop! 18 00:00:49,159 --> 00:00:54,409 The loop contains instructions with the command to repeat until goal. 19 00:00:54,409 --> 00:00:59,329 Once your program starts a repeat until goal loop, it will keep reading the instructions 20 00:00:59,329 --> 00:01:01,659 inside until it gets to the goal. 21 00:01:01,660 --> 00:01:03,280 Try this for yourself! 22 00:01:03,280 --> 00:01:07,960 Place the commands you want to repeat inside the repeat until goal block, 23 00:01:07,960 --> 00:01:10,100 click run, and watch it go! 24 00:01:12,360 --> 00:01:14,480 Well, that was a little weird. 25 00:01:14,480 --> 00:01:16,150 Who knew squids could code? 26 00:01:16,150 --> 00:01:18,570 I didn't even think they had fingers. 27 00:01:18,570 --> 00:01:20,940 So now we know about loops. 28 00:01:20,940 --> 00:01:23,320 Let's use them to bag us some more treasure. 29 00:01:23,320 --> 00:01:24,000 Subtitles by the Amara.org community