Conditions (Part 1)
For this series of challenges, we will need to use the color sensor to determine which way to move.
Example
Reset the world a few times to see where the green box may appear...
In this example challenge, the box may appear in front of the robot, or to the right of the robot.
If the box is in front...
If the box is to the right...
How can we decide which blocks to use?
Color Sensor
Notice that the ground below the robot is Green when the box is on the right, and white when the box is in front?
We can use a condition to check the color of the ground, then decide which way to move.
Challenges
For each challenge, click on the Simulator Tab, then the Mission button to see the mission you need to do.
Follow the instructions and note down the special Code after doing the challenge successfully!
Conditions Challenge 1
-
Load this challenge
-
Optional Bonus: Complete this challenge using only 5 blocks.
Conditions Challenge 2
-
Load this challenge
-
Optional Bonus: Complete this challenge using only 7 blocks.
Conditions Challenge 3
-
Load this challenge
-
Optional Bonus: Complete this challenge using only 8 blocks.
Conditions Challenge 4
-
Load this challenge
-
Optional Bonus: Complete this challenge using only 7 blocks.
Conditions Challenge 5
-
Load this challenge
-
Optional Bonus: Complete this challenge using only 13 blocks.