Activities/Turtle Art/Tutorials/Stack Programming

From Sugar Labs
< Activities‎ | Turtle Art‎ | Tutorials
Revision as of 03:17, 22 September 2011 by Tonyforster (talk | contribs)
Jump to navigation Jump to search

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


Screenshot of Turtle Art Activity forth.png

What computations can you make with this set of words?

Make additional words with Turtle blocks