[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.90,0:00:03.00,Default,,0000,0000,0000,,People make decisions every day. Dialogue: 0,0:00:03.00,0:00:05.00,Default,,0000,0000,0000,,For example before you go outside Dialogue: 0,0:00:05.00,0:00:06.70,Default,,0000,0000,0000,,you kind of have an IF statement that says, Dialogue: 0,0:00:06.70,0:00:10.00,Default,,0000,0000,0000,,IF it's raining,\NTHEN I need to get my jacket. Dialogue: 0,0:00:10.00,0:00:16.00,Default,,0000,0000,0000,,And, computers are amazing once you decide those kinds of statements, Dialogue: 0,0:00:16.00,0:00:21.00,Default,,0000,0000,0000,,that they can reliably execute those things at unbelievable speed. Dialogue: 0,0:00:21.00,0:00:24.50,Default,,0000,0000,0000,,And so, a computer program really Dialogue: 0,0:00:24.55,0:00:27.70,Default,,0000,0000,0000,,is a little bit of math and some Dialogue: 0,0:00:27.70,0:00:31.41,Default,,0000,0000,0000,,IF statements, where the decision gets made. Dialogue: 0,0:00:31.41,0:00:34.00,Default,,0000,0000,0000,,So, in this puzzle the Dialogue: 0,0:00:34.00,0:00:37.50,Default,,0000,0000,0000,,IF block helps the zombie make a decision, Dialogue: 0,0:00:37.50,0:00:39.80,Default,,0000,0000,0000,,it checks something. Dialogue: 0,0:00:39.80,0:00:45.00,Default,,0000,0000,0000,,For example let's use the block that says, "if there's a path to the left," Dialogue: 0,0:00:45.00,0:00:48.00,Default,,0000,0000,0000,,and put a "turn left" command inside it. Dialogue: 0,0:00:48.00,0:00:51.50,Default,,0000,0000,0000,,So, we're telling the zombie to check its surroundings, Dialogue: 0,0:00:51.50,0:00:53.70,Default,,0000,0000,0000,,see if there's that path on the left, Dialogue: 0,0:00:53.70,0:00:56.00,Default,,0000,0000,0000,,and if so, make that turn. Dialogue: 0,0:00:56.00,0:01:01.31,Default,,0000,0000,0000,,And then we use the "move forward" block inside this "repeat" Dialogue: 0,0:01:01.31,0:01:04.00,Default,,0000,0000,0000,,to get it to keep moving forward as long as Dialogue: 0,0:01:04.00,0:01:06.00,Default,,0000,0000,0000,,it just wants to go straight. Dialogue: 0,0:01:06.00,0:01:12.00,Default,,0000,0000,0000,,Then when there's the turn, the IF block\Nwill tell it to make this turn to the left. Dialogue: 0,0:01:12.00,0:01:13.90,Default,,0000,0000,0000,,And you can see, if we do that Dialogue: 0,0:01:13.90,0:01:18.40,Default,,0000,0000,0000,,if we're taking the turn to the left and otherwise moving forward, \Nwe'll achieve our goal. Dialogue: 0,0:01:18.40,0:01:21.72,Default,,0000,0000,0000,,So it's an example of using an IF statement, Dialogue: 0,0:01:21.72,0:01:26.34,Default,,0000,0000,0000,,which is really a fundamental concept in computer programming. Dialogue: 0,0:01:26.34,0:01:32.00,Default,,0000,0000,0000,,One of the first things I learned was how to write a program to play tic-tac-toe. Dialogue: 0,0:01:32.00,0:01:34.90,Default,,0000,0000,0000,,So I had IF statements to say okay, Dialogue: 0,0:01:34.90,0:01:39.20,Default,,0000,0000,0000,,IF the other person is about to win go ahead and block that spot. Dialogue: 0,0:01:39.20,0:01:44.41,Default,,0000,0000,0000,,So have fun learning how to use IF statements. It's a key concept.