Jump to content

Activities/Turtle Art/Tutorials/Stack Programming: Difference between revisions

From Sugar Labs
Tonyforster (talk | contribs)
No edit summary
Tonyforster (talk | contribs)
No edit summary
Line 7: Line 7:


[[File:Screenshot of Turtle Art Activity forth.png|600px]]
[[File:Screenshot of Turtle Art Activity forth.png|600px]]
[[File:Turtle Art Activity forth.ta]]


What computations can you make with this set of words?
What computations can you make with this set of words?


Make additional words with Turtle blocks
Make additional words with Turtle blocks

Revision as of 04:20, 22 September 2011

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


File:Turtle Art Activity forth.ta

What computations can you make with this set of words?

Make additional words with Turtle blocks