Line 65: |
Line 65: |
| [[File:TASetBackground-60-80.png]] | | [[File:TASetBackground-60-80.png]] |
| | | |
− | Oh. A lot more goes on here. Turtle Art told Logo about how it handles colors. Down at the bottom, though, there is a procedure definition for tasetbackground, which is then called with the arguments 60.0 for color and 80.0 for shade, as we specified. And look! It's blue! | + | Oh. A lot more goes on here. Turtle Art told Logo about how it handles colors. I won't explain everything in detail, but let's make a list of bits of Logo we haven't seen yet. |
| + | |
| + | * : for arguments to a function in the definition |
| + | * "name is the name itself, not the value of the variable with that name |
| + | * make to give a value to a variable |
| + | * arithmetic including modulo (remainder on division) |
| + | * ifelse condition [what to do] |
| + | * first gets the first item from a list |
| + | * butfirst drops the first item from a list |
| + | * [data] makes a list |
| + | * colors holds the numeric definition of the Turtle Art color palette |
| + | |
| + | That's more features that fit comfortably in teaching a lesson, but might not be too many in guided discovery over several sessions. With the hints given above, you should be able to see what every part of this Logo program is, but not necessarily how all of the parts fit together. That will require careful reading, including comparing definitions with their uses, and lots of experiments. For some learners, that's the best part of all. For others, including many teachers, it is a useful lesson in tolerating your own ignorance while you seek to discover something you didn't know. Anyway, we don't have to require that everybody discover everything. Students can share discoveries, which is another particularly useful lesson in itself. |
| + | |
| + | Once we get past those definitions, though, there is a procedure definition for tasetbackground, corresponding to the block we are testing. It is then called with the arguments 60.0 for color and 80.0 for shade, as we specified. And look! It's blue! |
| | | |
| window | | window |