My son's first program
I am a programmer and I also would like to teach all I know for years to my son. He is 5 years old and know a little bit English. Actually, I want to try teaching Python but it might be too difficult for a kids who are not familiar to English language. I don't know which the best language for kid but my first programming language is Logo so I decied to give it a try.
The Logo implementaion I decided to use is FMSLogo which is absolutely open source. I shown him the first command to control the turtle.
FD 100
And he liked it at the first glance. The reason is he loves to control everything and the turtle served his desire as expected. Then I shown him another command.
LT 90
Then repeat above 2 commands.
FD 100 LT 90
After the fourth repeat, we got a square! I continued to extend this square by moving to the upper right conner and starting to draw a triangle.
FD 100
LT 30
FD 100
LT 120
FD 100
To make it clean, I then moved the turtle back home.
LT 120
FD 100
LT 90
BK 100
As a result, my son and I wrote a simple program to draw a home.
FD 100 LT 90
FD 100 LT 90
FD 100 LT 90
FD 100 LT 90
FD 100
LT 30
FD 100
LT 120
FD 100
LT 120
FD 100
LT 90
BK 100
Now it is my turn to explore more for next lesson tomorrow. Since my laptop is Ubuntu Feisty, I tried to run Logo using [KTurtle][] which included in Edubuntu. The problem is incompatibility of KTurtle and FMSLogo. I have to modify above program as follows to let it run correctly in KTurtle.
learn FD x [ forward x ] learn BK x [ backward x ] learn LT x [ turnleft x ] FD 100 LT 90 FD 100 LT 90 FD 100 LT 90 FD 100 LT 90 FD 100 LT 30 FD 100 LT 120 FD 100 LT 120 FD 100 LT 90 BK 100
This is not good at all. I expect to have cross-platform Logo interpreter. Fortunately, I tried to run FMSLogo on Linux using Wine and it works almost perfect. KTurtle might be a good software but in this case, I chose FMSLogo as long as there is no KTurtle for Win32 patform.
- sugree's blog
- 3649 reads
ขอบคุณครั
Try aUCBLogo on GNU/Linux
Post new comment