WEBVTT 00:00:00.100 --> 00:00:00.980 Great! 00:00:00.980 --> 00:00:02.440 We've caught a codfish! 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 00:00:07.510 --> 00:00:09.550 where there may be treasure? 00:00:09.550 --> 00:00:11.610 We must be getting closer. 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. 00:00:17.510 --> 00:00:18.510 What's this? 00:00:18.510 --> 00:00:19.920 A cave? 00:00:19.920 --> 00:00:21.390 Welcome, adventurers! 00:00:21.390 --> 00:00:22.660 My name is Squid. 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. 00:00:28.000 --> 00:00:29.840 Must've been a bit tiresome. 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, 00:00:33.890 --> 00:00:37.760 washing dishes or brushing your teeth without getting tired or bored? 00:00:37.760 --> 00:00:39.219 That would be nice. 00:00:39.219 --> 00:00:45.049 Computers are really good at doing the same thing over and over again using coding loops. 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! 00:00:49.159 --> 00:00:54.409 The loop contains instructions with the command to repeat until goal. 00:00:54.409 --> 00:00:59.329 Once your program starts a repeat until goal loop, it will keep reading the instructions 00:00:59.329 --> 00:01:01.659 inside until it gets to the goal. 00:01:01.660 --> 00:01:03.280 Try this for yourself! 00:01:03.280 --> 00:01:07.960 Place the commands you want to repeat inside the repeat until goal block, 00:01:07.960 --> 00:01:10.100 click run, and watch it go! 00:01:12.360 --> 00:01:14.480 Well, that was a little weird. 00:01:14.480 --> 00:01:16.150 Who knew squids could code? 00:01:16.150 --> 00:01:18.570 I didn't even think they had fingers. 00:01:18.570 --> 00:01:20.940 So now we know about loops. 00:01:20.940 --> 00:01:23.320 Let's use them to bag us some more treasure. 00:01:23.320 --> 00:01:24.000 Subtitles by the Amara.org community