[Newbies] Input and output of morphic text

Bert Freudenberg bert at freudenbergs.de
Wed Mar 13 12:15:12 UTC 2013

On 2013-03-13, at 02:01, Marshall Hampton <hamptonio at gmail.com> wrote:

> Hi,
> I am new to Squeak and Smalltalk.  After reading a few tutorials I am very intrigued and impressed.  Brief background for me: I am a mathematician, I am fairly skilled in Python, and I have worked at to varying degrees with C, C++, Java, Pascal, Basic, Fortran,  Javascript, Ruby, R, and Mathematica.
> I am homeschooling my daughter, who is 9.  She is quite proficient at Scratch.  A week ago I decided to give her a very brief tour of other programming languages by having her write a "Hello Pythagoras" program in each language.  This program should print "Hello Pythagoras" somehow, and then ask the user for two inputs (call them A and B).  It should then print sqrt(a^2 + b^2).  
> For her third language she chose Squeak, since she knew that Scratch was written in it.  I would like to have her write the "Hello Pythagoras" program using Morphic objects, in a visually appealing way.  So far I have had some trouble finding a tutorial that covers relevant information.  I am sure I can figure this out by poking around long enough but if anyone has a pointer to documentation that might help, or a similar example, that would be great and much appreciated.

Here is how to do it in Etoys (using the Squeakland version from http://squeakland.org/ ):


Took maybe 10 minutes, and that's including the graphical display of the triangle :)

- Bert -

More information about the Beginners mailing list