-
A variable is a container you can store a
value in. When you use that variable in an
-
algorithm, it opens up the container and looks
at the value inside. This lets you write smarter
-
algorithms that behave differently depending
on the value stored in the variable. For example,
-
if you wanted to write an algorithm to say
Happy birthday, you're turning 10! to my little
-
brother, that's great now but when I run it
next year I'd want it to say, Happy birthday,
-
you're turning 11! I could create a variable
called age to store my brother's age and write
-
my algorithm to say Happy birthday, you're
turning 'age' instead. Because variable can
-
change, every year I can update the variable
'age' to equal 'age' plus 1. In this puzzle,
-
we're going to be using a variable that will
set the length of the line our artist draws.
-
Later on in our code, the move forward block
will look at that length variable to see what
-
value you've set it to.