🤖 Variables Copy | Betabox

🤖 Variables Copy

Variables store information, which can be anything like the distance your car moved or how many times your car went around in a loop. We can do a lot of powerful things with variables.

To make a variable, click the Variables folder and then the Make a variable button.

Once you’ve made a variable, it will show up in the tab. Let’s make one called Circles.

If we want to count how many times we make a right turn, subtract the number of left turns and stop when we make five right turns, then the code would look like this:

The repeat function will keep turning right, left, then right, repeating until our variable Circles is greater than 5.