Difference between revisions of "Activities/Turtle Art/Tutorials/Stack Programming"
< Activities | Turtle Art | Tutorials
Jump to navigation
Jump to search
Tonyforster (talk | contribs) |
Tonyforster (talk | contribs) |
||
Line 1: | Line 1: | ||
+ | The Forth programming language uses a stack for computations. | ||
+ | |||
+ | On the right of the screen, the Forth words + - x / DUP and SWAP | ||
+ | |||
+ | On the left, a Forth like program to compute 3^2 +4^2 = 25 | ||
+ | |||
+ | |||
[[File:Screenshot of Turtle Art Activity forth.png|600px]] | [[File:Screenshot of Turtle Art Activity forth.png|600px]] | ||
+ | |||
+ | What computations can you make with this set of words? | ||
+ | |||
+ | Make additional words with Turtle blocks |