Rotate your device.
Turn off orientation lock in device settings.
Your browser is not supported. Please upgrade your browser to one of our supported browsers. You can try viewing the page, but expect functionality to be broken.
CS in Algebra curriculum and content is being deprecated. Within the next few months, this lab will no longer be available. Please check out Bootstrap: Algebra instead. Learn More.
Rotate your device.
Turn off orientation lock in device settings.
Lava is hiding beneath some of these blocks, which you'll need to cover up before moving forward. An if
command will come in handy here. Add a move forward
command in the correct place to mine these blocks.
Version: 2021
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
Now we're going to learn about if statements. If statements are a fundamental part of learning to program. They help a computer make decisions.
All computers use if statements, including my phone. For example, when I unlock my phone, it runs some code that says if I enter the password correctly, then unlock the phone. Otherwise, it shows an error message.
You can use if statements in your code to make Steve and Alice react to what they see in the world. For example, if there is a rock in front of them, they can turn left. Or turn right if they run into a tree.
In this case, we don't want to fall in the lava. It's easy to plan for the lava. We can see it on the screen. But what about the lava that we can't under the stone?
After we mine the stone, we'll need to check if there's any lava in that place before moving forward. If there is lava there, we want to place a stone in front of our character before we can move forward. That way we can safely move on. Time for more mining! And remember to use the if statement to watch your step.