WEBVTT 00:00:00.900 --> 00:00:03.000 People make decisions every day. 00:00:03.000 --> 00:00:05.000 For example before you go outside 00:00:05.000 --> 00:00:06.700 you kind of have an IF statement that says, 00:00:06.700 --> 00:00:10.000 IF it's raining, THEN I need to get my jacket. 00:00:10.000 --> 00:00:16.000 And, computers are amazing once you decide those kinds of statements, 00:00:16.000 --> 00:00:21.000 that they can reliably execute those things at unbelievable speed. 00:00:21.000 --> 00:00:24.500 And so, a computer program really 00:00:24.550 --> 00:00:27.700 is a little bit of math and some 00:00:27.700 --> 00:00:31.410 IF statements, where the decision gets made. 00:00:31.410 --> 00:00:34.000 So, in this puzzle the 00:00:34.000 --> 00:00:37.500 IF block helps the zombie make a decision, 00:00:37.500 --> 00:00:39.800 it checks something. 00:00:39.800 --> 00:00:45.000 For example let's use the block that says, "if there's a path to the left," 00:00:45.000 --> 00:00:48.000 and put a "turn left" command inside it. 00:00:48.000 --> 00:00:51.500 So, we're telling the zombie to check its surroundings, 00:00:51.500 --> 00:00:53.700 see if there's that path on the left, 00:00:53.700 --> 00:00:56.000 and if so, make that turn. 00:00:56.000 --> 00:01:01.309 And then we use the "move forward" block inside this "repeat" 00:01:01.309 --> 00:01:04.000 to get it to keep moving forward as long as 00:01:04.000 --> 00:01:06.000 it just wants to go straight. 00:01:06.000 --> 00:01:12.000 Then when there's the turn, the IF block will tell it to make this turn to the left. 00:01:12.000 --> 00:01:13.900 And you can see, if we do that 00:01:13.900 --> 00:01:18.400 if we're taking the turn to the left and otherwise moving forward, we'll achieve our goal. 00:01:18.400 --> 00:01:21.720 So it's an example of using an IF statement, 00:01:21.720 --> 00:01:26.340 which is really a fundamental concept in computer programming. 00:01:26.340 --> 00:01:32.000 One of the first things I learned was how to write a program to play tic-tac-toe. 00:01:32.000 --> 00:01:34.900 So I had IF statements to say okay, 00:01:34.900 --> 00:01:39.200 IF the other person is about to win go ahead and block that spot. 00:01:39.200 --> 00:01:44.409 So have fun learning how to use IF statements. It's a key concept.