Jump to content

Activities/Turtle Art/Tutorials/Stack Programming

From Sugar Labs

The Forth programming language uses a stack for computations.

On the right of the screen, the Forth words + - x / DUP and SWAP are implemented with blocks.

On the left, a Forth like program to compute 3^2 +4^2 = 25


What computations can you make with this set of words?

Make additional words with Turtle blocks