we can update the value of a variable by assigning it a new value. Then, we can use that newly assigned value to do something new in our program Below we have our usual turtle sim, but with an important added feature, a slider at the top called NUMBER-OF-LAVA.
Change the slider and then click the RESET button. Now do it again. See any differences?
In our model here, we assigned (or updated) the value of a variable by using that slider. In a text based language like Python, we’ll instead use the symbol =
to assign value to a variable.