WEBVTT 00:00:00.430 --> 00:00:05.899 Now we're going to learn about if statements. If statements are a fundamental part of learning 00:00:05.899 --> 00:00:12.760 to program. They help a computer make decisions. All computers use if statements, including 00:00:12.760 --> 00:00:19.310 my phone. For example, when I unlock my phone, it runs some code that says if I enter the 00:00:19.310 --> 00:00:26.210 password correctly, then unlock the phone. Otherwise, it shows an error message. 00:00:26.210 --> 00:00:30.880 You can use if statements in your code to make Steve and Alice react to what they see in 00:00:30.880 --> 00:00:38.270 the world. For example, if there is a rock in front of them, they can turn left. Or turn 00:00:38.270 --> 00:00:45.790 right if they run into a tree. In this case, we don't want to fall into the lava. 00:00:45.790 --> 00:00:50.800 It's easy to plan for the lava. We can see it on the screen. But what about the lava that we 00:00:50.800 --> 00:00:55.110 can't see under the stone? After we mine the stone, we'll need to check 00:00:55.110 --> 00:01:02.110 if there's any lava in there before moving forward. If there is lava there, we want to 00:01:02.110 --> 00:01:08.650 place a stone in front of our character before we move forward. That way we can safely move on. 00:01:08.650 --> 00:01:15.500 Time for more mining! And remember to use the if statement to watch your step.