

- #Run a program in msw logo for free
- #Run a program in msw logo how to
- #Run a program in msw logo code
In this case, you would say on the command line,
#Run a program in msw logo how to
To square repeat 4 end Once you have described your procedure to Logo, you can enter its name on the command line just as you would any of the built-in things Logo knows how to do. In Logo, you tell the computer how to do something - for example, Other names for subprograms are procedures and functions. A subprogram is a named sequence of steps for another program to execute. PROGRAMMING FUNDAMENTAL 3: Subprograms For convenience and concision, we can add a new command to Logo's language. In between the drawings, I picked up the pen and moved the turtle.ĭrawings made using repeat or repeat ] The burst shape at the center used the penup and pendown commands. (This is called nesting.) What does this do? Think about it, then try it:Īll of these drawings use the repeat command. Repeat number We must use the keyword repeat followed by a number and then a sequence of commands in. Repeat 4 or repeat 4 to save ourselves some typing in making a square. Just about every programming system has a way of doing this repetition, or iteration, as computer scientists call it.

Many of the things that computer programs do, they do over and over. PROGRAMMING FUNDAMENTAL 2: Repetition You already have experience with this one, too: We often repeat a sequence of commands. (And that's all it will do.)Ĭlearscreen or cs erases all drawings and sets turtle at center useful at *beginning* of multi-step commands! pick pen up, penup or pu so you can move turtle without leaving tracks pendown or pd put pen down hideturtle or ht hides the turtle so you can admire your drawing showturtle or st shows the turtle so you can see what you're doing setpensize makes pen larger, easier to see! default pen size is label writes whatever at cursor location text goes in direction that turtle is pointing wait 20 put this between commands to slow turtle down so you can see what it's doing, for example: fd 100 rt 90 wait 20 fd 100 Find out how accurate your thinking is! The computer is your faithful servant: it will do exactly what you tell it to do. Try to map out all the steps in advance, then enter them at the command line. When you're designing a Logo drawing, think of the steps in the order that the computer should do them. PROGRAMMING FUNDAMENTAL 1: Sequence You have already experienced this one: Computers do commands in sequence. Makes two sides of a square several steps on command line are OK left 30 or lt 30 left turn 30 degrees back 100 or bk 100 go backward 100 steps clearscreen or cs erases all drawings and sets turtle at center useful at *beginning* of multi-step commands! Click a line in the history to make it jump to the command line, then make changes (or not) then press Enter or click Execute.īASICS Don't forget spaces between words! forward 50 or It's OK to write and run more than one command on line at a time. Press Enter or click Execute to run command written there. Write commands in command line, i.e., text box at bottom of Commander window. Here's the MSW Logo screen in two parts: drawing window above, with triangle-shaped TURTLE in center Commander window below The installation process puts a Logo icon (as on the cover of this document) on your computer desktop.
#Run a program in msw logo for free
Logo programming If Logo is not already on your computer, you can get it for free from its makers at

#Run a program in msw logo code
* My own web site offers code for things not included here.Ĭontents Programming fundamentals 1: Sequence * There are web sites galore, many with program examples. I will be happy to help you, and you can get much more help by helping yourself: * There is a very extensive help system built into the Logo interpreter. There is way more to it than I can show you or tell you, even if we took an entire semester. Computer Programming Fundamentals N V Fitton Northern Virginia Community College MSW Logo comes from Why learn Logo? * because it’s fun * because it makes us want to think clearly * because it's real computer science Logo is easy to learn, as programming languages go, yet it also has enough depth to do virtually anything that can be done in any computer language.
