1 00:00:00,900 --> 00:00:03,000 People make decisions every day. 2 00:00:03,000 --> 00:00:05,000 For example before you go outside 3 00:00:05,000 --> 00:00:06,700 you kind of have an IF statement that says, 4 00:00:06,700 --> 00:00:10,000 IF it's raining, THEN I need to get my jacket. 5 00:00:10,000 --> 00:00:16,000 And, computers are amazing once you decide those kinds of statements, 6 00:00:16,000 --> 00:00:21,000 that they can reliably execute those things at unbelievable speed. 7 00:00:21,000 --> 00:00:24,500 And so, a computer program really 8 00:00:24,550 --> 00:00:27,700 is a little bit of math and some 9 00:00:27,700 --> 00:00:31,410 IF statements, where the decision gets made. 10 00:00:31,410 --> 00:00:34,000 So, in this puzzle the 11 00:00:34,000 --> 00:00:37,500 IF block helps the zombie make a decision, 12 00:00:37,500 --> 00:00:39,800 it checks something. 13 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," 14 00:00:45,000 --> 00:00:48,000 and put a "turn left" command inside it. 15 00:00:48,000 --> 00:00:51,500 So, we're telling the zombie to check its surroundings, 16 00:00:51,500 --> 00:00:53,700 see if there's that path on the left, 17 00:00:53,700 --> 00:00:56,000 and if so, make that turn. 18 00:00:56,000 --> 00:01:01,309 And then we use the "move forward" block inside this "repeat" 19 00:01:01,309 --> 00:01:04,000 to get it to keep moving forward as long as 20 00:01:04,000 --> 00:01:06,000 it just wants to go straight. 21 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. 22 00:01:12,000 --> 00:01:13,900 And you can see, if we do that 23 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. 24 00:01:18,400 --> 00:01:21,720 So it's an example of using an IF statement, 25 00:01:21,720 --> 00:01:26,340 which is really a fundamental concept in computer programming. 26 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. 27 00:01:32,000 --> 00:01:34,900 So I had IF statements to say okay, 28 00:01:34,900 --> 00:01:39,200 IF the other person is about to win go ahead and block that spot. 29 00:01:39,200 --> 00:01:44,409 So have fun learning how to use IF statements. It's a key concept.