Image of LOGO LOGO

Lektion 8: Stars

     English   Deutsch   Français
Your browser does not support Java for the moment. In order to use this page we strongle suggest that you go to the "Java Help" page. Please choose "Java_Help" in the small menu below. It's possible to use our page without Java but then you will have to download a Logo interpreter from our "Download" page.

[_Home_] [_Introduction_] [_Java_Help_] [_Download_] [_Learn_Logo_] [_Program_] [_Teacher_] [_Contest_] [_Discussion_] [_Procedures_] [_Perspective_] [_About_]

©1997/1998 Sebastian Golze, Thomas Hirsch und
Vinh Hoi Le Chau
. Please mail us if you had problems with our site os if you have any other suggestion.

Your browser does not support Java. Please read the text on the left side of this page about Java. If you work without Java you will have to use the HTML menu below this text.
[1_First_steps] [2_Turn_left_turn_rigth] [3_With_colors] [4_Procedures] [5_Parameters] [6_Loops] [7_More_parameters] [8_Stars] [9_Upload_and_Download] [10_LOGO_learns_to_write]

Here comes the most interesting one of all lessons: Can you figure out what happens, when you write arbitrary series of commands into a procedure, and repeats this for about 100 times ? With a little luck, you will get a beautiful star with very few written lines. Here's an example:

procedure main
repeat 100, anything
end

procedure anything
go 200
rt 45
go 50
rt 124
end

Just play with the commands and watch the results. If you have found a star that you really like, keep the program until next lesson and we will teach you how to save and publish it, so that everybody in the world can see it. To keep the program in the memory of the computer, press your left mouse button on the text, hold it down and move your mouse so that the whole test is white-on-black. Now keep the key Ctrl (for "Control") pressed and press C (for "Copy"). In the next lesson, you just click with your mouse into the text window and press Ctrl and V to "paste" the text into.

Here's another nice trick. Since LOGO always knows how often he has repeated the procedure, you may use it in your program. The variable "loop" stands for this number. It changes with every repetition of the procedure. Such a variable is called dynamic variable

Now replace an arbitrary number in your text by the word "loop". In our example, LOGO makes two more steps forward with every repetition.

procedure main
repeat 100, anything
end

procedure anything
go loop*2
rt 70
end

lesson 7«------» lesson 9

Your browser does not support Java. With Java you would see here Logo sitting on his sheet of paper and the Logo interpreter. You have to activate Java or to use an external interpreter (which works exactly like this one) you can get at our "Download" section.