|
Lektion 8: Stars |
|
©1997/1998 Sebastian Golze, Thomas Hirsch
und
|
[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 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 |